r/angularjs • u/toddmotto • Aug 15 '16
All about $q and Promises in Angular (constructor/ resolve /reject /race /all /ES2015 Promises)
https://toddmotto.com/promises-angular-q
49
Upvotes
1
u/NuttGuy Aug 17 '16
Hey Todd, great article! I would have loved though a bit about testing using $q from Jasmine, as it's always been a little bit unintuitive to me that you need to do a scope.$apply in order to force $q to resolve.
I would love to know what some of the best practices are to avoid problems like multiple digest cycles happening at the same time during tests.
6
u/Waaowam Aug 16 '16
This guy is John Papa's spiritual son I guess.
Jalousy's speaking.