What happens to $ q.all () when some calls work while others fail?
I have the following code:
var entityIdColumn = $scope.entityType.toLowerCase() + 'Id'; var requests = $scope.grid.data .filter(function (rowData, i) { return !angular.equals(rowData, $scope.grid.backup[i]); }) .map(function (rowData, i) { var entityId = rowData[entityIdColumn]; return $http.put('/api/' + $scope.entityType + '/' + entityId, rowData); }); $q.all(requests).then(function (allResponses) {
When all $ http calls work, the allResponses array is populated with data.
When someone fails, I understand that the second function will be called, and the error variable is the data.
However, can someone explain to me what will happen if some of the answers work and others fail?
javascript angularjs angular-promise
Alan2 Nov 13 '13 at 3:51
source share