I have been working on a web application which will send some ajax requests 
to the server when the user is browsing the page. 

One requirement is that when a new ajax requirement is sent, if its 
previous request is not completed, it should be cancelled. I have doing the 
prototype of if with $q.defer. 

I have done a simple demo for this and it works fine with $http.get method 
but it doesn't work with $http.post method. 

http://plnkr.co/edit/gkvxRj?p=preview

My question is that is there a way to cancel post request or am I doing 
anything wrong?

As for post, I know there is CORS issues, but please don't worry about 
that, the server is under our control. So please don't worry about that. 


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to