hi all,
I need to get latest data by getLatest10 function, but got 'Error:
error:infdig Infinite $digest '.
key code pasted to following, anyone can help to check, thanks a lot.
html code:
**********************************
<tbody>
<tr ng-repeat="item in ping.data">
<td>{{item.stattime | date : 'yyyy-MM-dd hh:mm' }}</td>
<td>{{item.srcIdc}}</td>
<td>{{item.dstIdc}}</td>
<td>{{item.srcIp}}</td>
<td>{{item.dstIp}}</td>
<td>{{item.loss}}</td>
<td>{{item.latency}}</td>
<td>
{{getLatest10(item.srcIdc, item.dstIdc)}}
</td>
</tr>
</tbody>
************************************
controller.js
************************************
app.controller('NetworkCtrl', ['$scope', '$log', '$modal',
'NetworkService', function($scope, $log, $modal, NetServ) {
$scope.ping = {};
$scope.ping.data = NetServ.ping.query({srcIdc: 'hongkong'});
$scope.getLatest10 = function(srcIdc, dstIdc){
NetServ.ping.query({srcIdc: srcIdc, dstIdc:
dstIdc}).$promise.then(function(result){
var data = [];
angular.forEach(result, function(value, key){
data.push([1])
})
return data;
})
}
}]);
****************************************
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.