Victor Orletchi
Victor Orletchi

Reputation: 497

Automatic $cancelRequest() for all pending request in $rootScope.$on('$stateChangeStart')

We have a page with multiple requests to the backend REST with big delay and much calculation time on the server side, that makes a user to wait for a long time until all queries respond, then run other requests no matter whether new queries are fired by the actions on the page itself. If it does not matter whether that page or state changes it, then I would like to cancel the pending requests. I can cancel each pending request by using $cancelRequest() function from ngResource#1.6.6.

Answer

Used

Upvotes: 0

Views: 48

Answers (0)

Related Questions