The GWAPS team used this pattern extensively.
For recording purposes.
$q.serial a cleaner way to execute promises serially in AngularJS.March 11, 2015UncategorizedSteven WexlerHey AngularJS devs! Let’s talk about executing async tasks serially with promises and how $q.serial can help.First, we notice .then allows our success/fail callbacks to return a promise. $q treats success/fail callbacks that return promises specially. We’ll look at two examples to see how $q treats success/fail functions that return promises differently from those that don’t.
Source: $q.serial a cleaner way to execute promises serially in AngularJS. – Code Ducky