Skip to content

Instantly share code, notes, and snippets.

@riebschlager
Created May 11, 2016 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riebschlager/617bc99b500f4b79132333e76bf81b11 to your computer and use it in GitHub Desktop.
Save riebschlager/617bc99b500f4b79132333e76bf81b11 to your computer and use it in GitHub Desktop.
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