Answer the question
In order to leave comments, you need to log in
How to force $http of angular not to make requests?
There is a request outside of angular, before the return of which it is necessary that no $http request be called. How to do something like this? Thank you.
Answer the question
In order to leave comments, you need to log in
1) we make our own wrapper over $http (you can use a decorator service).
2) inside the chain promises so that if something happens, postpone requests
3) ...
4) profit.
The simplest option, if you need to do this globally, is interceptors.
As an implementation example, you can look at angular-http-auth . There inside there is an internal queue of requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question