When a user switch a state when another state is being loaded, I am destroying the controller of the previous state. But there are still some promises in the previous state that are yet to be resolved. So even after destroying the state controller, The then() method of these promises are being called. So I wanted to cancel all the existing promises by calling resolve() on the promises on destroying the controller. But the promise returned by $q.all() does not have a resolve() method. Nor does it return the individual promises on which I can call resolve to abort the promises. Is there any way that I can achieve this?
Asked
Active
Viewed 699 times
0
-
check this `http://stackoverflow.com/questions/30805066/how-to-destroy-unresolved-promise` – Atul Sharma Feb 08 '17 at 14:00
-
Please provide a [mcve] – charlietfl Feb 08 '17 at 14:21