Listen to what other said already. Once you are all ready to asynchronous, you will come to something like this:
$http.get(...)
.then(function(response1) {
return $http.get(...);
})
.then(function(response2) {
return $http.get(...);
})
.then(function(response3) {
return $http.get(...);
})
...you can chain like that as long as you want.
There is no need to return only $http promises. You can return whatever you want, including other promises... or just regular values.
You can also attach error handlers just like with try...catch synchronous equivalent.
Do your async/promises/Q/$q homework and you will discover brand new world :-)
Regards,
Witold Szczerba
---
Sent from my mobile phone.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.