$http.get(...).then().
.then , " , successCallback, errorCallback".
, , .then, , $http.get. ()! , .then, - , contentPromises.
- :
angular.forEach(contents, function(content) {
contentPromises.push(
$http.get(urlBase + "ActionItems?$filter=ProjectId eq " + content.Id ).then(function(success){
content['ActionItems'] = success.data.d.results;
return success;
})
);
});
errorCallback.