In angular JS 1.1.5 you can cancel previously started $http calls. These two link1 and link2 gives some explanation on how it works.
However I can't understand, how to use this in practice. I created plnkr to illustrate what I want to achieve.
As you can see in plnkr request fires and gets canceled immediately, but I'm expecting last request to succeed.
I'm new to angularjs so probably I'm doing it wrong. I've gooled everything I can imagine, but there are no full examples for canceler.resolve()
Can anyone help me with this or guide me to right direction?
You need to create a new canceler for each request, because once it's resolved it can't be used again.
See here for an updated plnkr.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With