Controller:
promiseObj.physical = $http.get('search?sumBoth=1&customer=' + customer).success(function(data) {
$scope.servers = data; // retrieve data from JSON
});
View:
<tr ng-repeat="data in servers | filter: { _id: { idc: item._id.idc } }">
<td>{{data._id.cluster}}</td>
<td>{{data.Physical.SumCores}}</td>
<td>{{data.Virtual.SumCores}}</td>
<td>{{data.Physical.SumMemory}}</td>
</tr>
Oversubscription? <input type="checkbox" name="oversubscription" />
I want to update
<td>{{data.Virtual.SumCores}}</td>
to <td>{{data.Virtual.SumCores/4}}</td>
if the oversubscription is true.
I am new to Angular and still learning:
Should I make this change in the view or the controller?
What would be the best approach for this situation?