Bug(tranloco): provideTranslocoTranspiler does not work with FunctionalTranspiler
ghostlytalamaur opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
Yes
Current behavior
When you provide FunctionalTranspiler
using provideTranslocoTranspiler(FunctionalTranspiler)
error is raised. It happens because this.injector
in FunctionalTranspiler
actually is not an injector, but TranslocoConfig
object due to deps
field in provideTranslocoTranspiler
function.
I suggest:
provideTranslocoTranspiler
should not usedeps
array;DefaultTranspiler
andFunctionalTranspiler
should useinject
FunctionalTranspiler
should use correct config. Right now config is not passed to baseDefaultTranspiller
class.
Expected behavior
provideTranslocoTranspiler
should work as expected with DefaultTranspiler
and FunctionalTranspiler
Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
https://stackblitz.com/edit/stackblitz-starters-1ehzbq?file=src%2Fmain.ts
Transloco Config
No response
Please provide the environment you discovered this bug in
Transloco: 6.0.0
Browser
No response
Additional context
No response
I would like to make a pull request for this bug
No
Start a new pull request in StackBlitz Codeflow.