AngularJS Promises, $q, defer
IMHO I think there’s a much clever (and elegant) way to do this with $q.all. Please take a look at the code below. I am assuming that you want to return the data at once with all the results aggregated on a big array. var myApp = angular.module(‘myApp’, []); myApp.factory(‘myService’, function ($http, $q) { return … Read more