Created
May 11, 2016 21:36
-
-
Save riebschlager/617bc99b500f4b79132333e76bf81b11 to your computer and use it in GitHub Desktop.
This file contains 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
app.controller('AppCtrl', function($scope, $q, $http) { | |
var reqs = [ | |
$http.get('http://10.40.110.202/api/videos/'), | |
$http.get('http://10.40.110.202/api/videos/'), | |
$http.get('http://10.40.110.202/api/videos/') | |
]; | |
$q.all(reqs).then(function(data){ | |
console.log(data[0]); // Response from the 1st request | |
console.log(data[1]); // Response from the 2nd request | |
console.log(data[2]); // Response from the 3rd request | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment