I have 3 services that return 3 promises, but the third needs data from the second, so I call it in the second. I want to wait until all three promises are resolved, so I implemented it, but it doesnβt work (it waits only for the first and second).
var promise1, promise2, promise3; promise1 = service1(); promise2 = service2(); promise2.then(function (data) { promise3= service3(data); }); $q.all([ promise1, promise2, promise3]).then(function success() {
source share