Controller:
promiseObj.physical = $http.get('search?sumBoth=1&customer=' + customer).success(function(data) {
$scope.servers = data; // get 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" />
What I am trying to do is to change <td>{{data.Virtual.SumCores}}</td> to <td>{{data.Virtual.SumCores/4}}</td> if over subscription is equal to true
Fairly new to angular and I am still learning:
Do I do this in the view or the controller?
What is the best approach?
oversubscriptionapply to the entire repeat or only specific elements?