async is a great module.  It easily allows you to run things in series, in 
parallel, or in waterfall, where the next function relies on the results of the 
prior one.


Regards
-Greg Pasquariello

Email: [email protected]<mailto:[email protected]>
Phone: 303-648-1334
Skype: [email protected]<mailto:[email protected]>


From: Adam Gainsley
Reply-To: "[email protected]<mailto:[email protected]>"
Date: Sunday, February 8, 2015 at 11:27 AM
To: "[email protected]<mailto:[email protected]>"
Subject: [AngularJS] Re: What is the best way to do sequential rest calls in 
angualarjs

There are a couple ways to manage synchronous work that I like.

One is promise chaining as Trishul mentioned. Angular comes with the q promise 
library available and that works well. Of course you can use other promise 
libraries if you have one you prefer.

The second way to manage sync work is to use caolan async (there are probably 
other similar tools out there but this is my favorite). 
https://github.com/caolan/async

On Saturday, February 7, 2015 at 2:35:07 AM UTC-5, Suneetha itham wrote:
In my application, I have sign page. When user log in to the application, I 
have to make three sequential rest calls to check for authentication, getting 
tasks list and user tasks. Now, I want to know that, what is the best way to do 
rest calls that will take minimum amount of time and also wont affects the 
application performance.

--
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 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to