Consider 3 calls to the same API method. They are independent of each other. How can I call them asynchronously so that as soon as any one of them has completed I can do something with the response instead of waiting for the other ones to complete? Looking for something similar to System.Threading.Tasks available in C#
var promise1 = $http.get("/api/city/boston");
promise1.success(function(name) {
console.log("Your city is: " + name);
});
var promise2 = $http.get("/api/city/newyork");
promise2.success(function(name) {
console.log("Your city is: " + name);
});
var promise3 = $http.get("/api/city/chicago");
promise3.success(function(name) {
console.log("Your city is: " + name);
});