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