The promise returned from $q.when( args ) auto resolves when all its args (promises or converted to promises) resolve. There is no specific order for each individual to be resolved in $q.when; so therefore it should be considered PARALLEL async processing. If you need SEQUENCIAL processing, do NOT use $q.when().
I recommend you read *[Flattening] Promise Chains*<http://solutionoptimist.com/2013/12/27/javascript-promise-chains-2/>for details and ideas. - ThomasB On Wednesday, January 8, 2014 9:29:39 AM UTC-6, Arturo Hernandez wrote: > > Everybody, > > I found out a bit late that there is no way to resolve a call a promise > created by $q.when( ... ). I am using it to cache a REST service call. > Sometimes I get the actual value back sometimes I get a promise back. > > To make the question short. Does anyone know if these promises will be > "finalized" in the order received? > > > Arturo Hernandez? > -- 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/groups/opt_out.
