Code in while loop is executed to create/define a method on promise 
resolution. promise.then() does not mean that the function in #then will be 
executed immediately.

Instead, while loop will run until either of the condition results in 
false. First condition will never return false. Second one will return 
false, once the code block in #then executed. This code block will be 
executed one the promise is resolved.

Hope it clarifies.

-- 
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