Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpClientModule Import in sub-modules override HttpClient defined in the AppModule #631

Closed
oldpirate opened this issue Aug 13, 2018 · 4 comments

Comments

@oldpirate
Copy link

Hi guys, i found a little problem with the HttpClientModule,

If a define a HTTP_INTERCEPTOR in app module if in a submodule (lazy loaded) there's a import of H
HttpClientModule the interceptors not work cause the new import rewrite the HTTP_INTERCEPTOR

reference:

MODULE: ng2-completer
oferh/ng2-completer#393

MODULE: NbAuthModule
https://github.com/akveo/nebular/blob/master/src/framework/auth/auth.module.ts

thanks in advice for your work

@oldpirate
Copy link
Author

angular reference:

angular/angular#20575

@nnixaa
Copy link
Collaborator

nnixaa commented Aug 13, 2018

Hey @oldpirate, so am I correct that we shouldn't import HttpClientModule in the auth.module?

@oldpirate
Copy link
Author

hi nnixaa,
i think so, I'm looking for more information because as you can see there are other third-party modules that import httpclientmodule, I think they have to do a fix at the level of angular.
For now if you want to use http interceptors at the appmodule level you do not have to import httpmodule into other modules.

@thedotfilesdev
Copy link

Hi guys.
MurhafSousli/ngx-sharebuttons#174
Here you can also find more information. They had the same bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants