Is there a way to include additional configurations in $http service response? The code snippet below demonstrates the scenario:
var promises = [];
angular.forEach(rows, function(rowIterator) {
var additionalConfig = {
config1: rowIterator.config1,
config2: rowIterator.config2
}
promise = $http({
method: "get",
url: "http://domain.com/" + rowIterator.videoId + '?appName=playlist',
params: {}
});
promises.push(promise);
});
return $q.all(promises).then(function(data) {
// How can I access fetched data along with the custom configs from 'additionalConfig'?
});
In this case, how do I extract and utilize the data retrieved by $q.all while maintaining the passed configurations from 'additionalConfig'?