HttpClientModule imported in AvatarModule override HttpClient defined in the AppModule
See original GitHub issueFirst, thank u for this library, good job. It’s saving me a lot of time.
I’m facing an issue, I will try to explain it. In my app (Ionic3/Angular5), I have injected the HttpClientModule
in the root module, aka AppModule
, with a few HTTP interceptors.
Then I have a feature module (lazy loaded) where I’m using ngx-avatar
. It is working but the services I have in that module stop working after adding the AvatarModule
. They are not using the HTTP interceptors anymore.
I’ve forked your repo and seems it’s because the AvatarModule
is importing also the HttpClientModule
so there are 2 instances in the angular dependency injection system and the feature module is using the one provided by the AvatarModule
.
I have a patch removing the import for the HttpClientModule
in the AvatarModule
and everything works again. I can send a PR if you agree.
thx
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
thx, I have a patch in my fork, I can send a PR if u agree.
I just published new version v3.4.0 that includes the fix.