Last active
July 17, 2017 04:44
-
-
Save wwwmarcos/1f501b12cb1e34c6262f816062702fe6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var promises = []; | |
for(var i = 0; i < 5; i++) { | |
var promise = $http.get('/data' + i); | |
promises.push(promise); | |
} | |
$q.all(promises).then(doSomethingAfterAllRequests) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment