阅读背景:

使用AngularJS运行时中的资源更新控制器中的值

来源:互联网 

My controller code

我的控制器代码

//first $http request to get results.wesites
// i want to get $scope.totalchatsdone as an integer dont know how 
$scope.totalchatsdone  = function (){  
    var i =0;
    $.each(results.websites,function(index,website){
    var id = website.id;
    $scope.tech = techRepository.getTech.query({ id }, function(data) {
        console.log("total--"+ data.total)
        i += data.total;
    });
});
console.log("i is--"+i)
return i;
};
//first $http r



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: