Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

HttpClientModule Import (angular6) #393

Closed
pixelit opened this issue Jul 2, 2018 · 3 comments
Closed

HttpClientModule Import (angular6) #393

pixelit opened this issue Jul 2, 2018 · 3 comments

Comments

@pixelit
Copy link

pixelit commented Jul 2, 2018

I upgraded my application to angular6 and use ng2-completer@next for compability.

I import Ng2CompleterModule in a Submodule. This overwrites my HTTP_INTERCEPTORS (from the root module) in the submodule.

From what I could gather from this issue: angular/angular#20575 you must not import HttpClientModule in the component.

@dmitryallen
Copy link

dmitryallen commented Jul 4, 2018

Unfortunately importing of HttpClientModule will create second instance of HttpClient. So we can have a situation when module will just override HttpClient we defined in the AppModule, thus we are loosing all Interceptors defined in application. Removing of Ng2CompleterModule from project is solving problem with swiped interceptors.

Please look on this issue from other component:
MurhafSousli/ngx-sharebuttons#174

@thedotfilesdev
Copy link

I have same problem and because of that I cannot upgrade dependencies. @oferh what would you like to do with that? For me you should remove HttpClientModule dependencies and allow user to pass it to your library.

@oferh
Copy link
Owner

oferh commented Sep 10, 2018

dependency removed in 3.0.0-beta.2

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

No branches or pull requests

4 participants