[Doc] Multi Provider dependency order #23059
Labels
area: core
Issues related to the framework runtime
core: di
feature: insufficient votes
Label to add when the not a sufficient number of votes or comments from unique authors
feature: votes required
Feature request which is currently still in the voting phase
feature
Issue that requests a new feature
freq2: medium
P4
A relatively minor issue that is not relevant to core functions
Milestone
Current behavior
Questions like this are unanswered. Nobody knows, or at least it seems so to me, and I cannot find relevant documentation.
Expected behavior
Would be good to find straightforward information about this in the documentation.
Minimal reproduction of the problem with instructions
My problem is as follows:
I want to use a custom AuthInterceptor for use with HttpClientModule, but also need the JsonpInterceptor from HttpClientJsonpModule.
I am doing like so in my AppModule:
But order of injection is important here!
I don't know how to control the order of injection for the HTTP_INTERCEPTORS multi-provider.
In my scenario it seems to happen so that the JsonpInterceptor provided by HttpClientJsonpModule is added first to the HTTP_INTERCEPTORS, which means, it will be called first in the chain of interceptors. I want exactly the opposite, because the JsonpInterceptor will not call
next()
to let any other interceptors run through if it finds a jsonp request. But I don't know a way to change the order.What is the motivation / use case for changing the behavior?
Inform developers better so that they don't have to waste so much time searching and reading the angular core code to find andswers. Because time is valuable.
Environment
The text was updated successfully, but these errors were encountered: