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 must not be imported in libraries #8

Open
adestis-ds opened this issue Jul 22, 2019 · 2 comments
Open

HttpClientModule must not be imported in libraries #8

adestis-ds opened this issue Jul 22, 2019 · 2 comments

Comments

@adestis-ds
Copy link

According to this threat angular/angular#20575 HttpClientModule must not be imported by a library. In order to use HTTP_INTERCEPTORS (e.g. for authentication) HttpClientModule has to be imported by the root or a core module. If it is also imported by a library then the HTTP_INTERCEPTORS are not used in lazy loaded modules.

You should rely only on DI in order to get the HttpClient!

This problem prevents me from using your library because it breaks authentication in my lazy loaded modules!

@kees-wiegel-visma
Copy link

Fixed in ebenefits#32

@kees-wiegel-visma
Copy link

@riccardomariani I suggest to close this issue

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

No branches or pull requests

2 participants