[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
When loaded in root or directly connected module, it works fine but when loaded as lazy module there is a problem:
taticInjectorError(AppModule)[TranslocoService -> InjectionToken TRANSLOCO_TRANSPILER]:
StaticInjectorError(Platform: core)[TranslocoService -> InjectionToken TRANSLOCO_TRANSPILER]:
NullInjectorError: No provider for InjectionToken TRANSLOCO_TRANSPILER!
NullInjectorError: StaticInjectorError[I18nService -> TranslocoService]:
StaticInjectorError(AppModule)[TranslocoService -> InjectionToken TRANSLOCO_TRANSPILER]:
StaticInjectorError(Platform: core)[TranslocoService -> InjectionToken TRANSLOCO_TRANSPILER]:
NullInjectorError: No provider for InjectionToken TRANSLOCO_TRANSPILER!
Expected behavior
works not only as imported in static module
Minimal reproduction of the problem with instructions
same as https://github.com/ngneat/transloco/issues/152.
I have also tried to use TranslocoService as an own provider from useFactory, but it is not used.
Maybe the cause is provideIn: 'root'?
What is the motivation / use case for changing the behavior?
I am creating application/library which have translation module configured before usage. Configuration is not predefined, and may be different
Environment
Angular version: 8.2.14
transloco: 2.3.15
Browser:
- [x] Chrome (desktop) version 80.0.3987.122
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: v12.13.1
- Platform: windows
I'm submitting a...
Current behavior
When loaded in root or directly connected module, it works fine but when loaded as lazy module there is a problem:
Expected behavior
works not only as imported in static module
Minimal reproduction of the problem with instructions
same as https://github.com/ngneat/transloco/issues/152. I have also tried to use
TranslocoService
as an own provider from useFactory, but it is not used. Maybe the cause isprovideIn: 'root'
?What is the motivation / use case for changing the behavior?
I am creating application/library which have translation module configured before usage. Configuration is not predefined, and may be different
Environment