Closed tatsujb closed 6 years ago
With the above I get :
vendor.js:30179 ERROR Error: StaticInjectorError(AppModule)[I18n -> InjectionToken TranslationsFormat]:
StaticInjectorError(Platform: core)[I18n -> InjectionToken TranslationsFormat]:
NullInjectorError: No provider for InjectionToken TranslationsFormat!
at NullInjector.get (vendor.js:29444)
at resolveToken (vendor.js:29724)
at tryResolveToken (vendor.js:29665)
at StaticInjector.get (vendor.js:29536)
at resolveToken (vendor.js:29724)
at tryResolveToken (vendor.js:29665)
at StaticInjector.get (vendor.js:29536)
at resolveNgModuleDep (vendor.js:38652)
at _createClass (vendor.js:38726)
at _createProviderInstance$1 (vendor.js:38684)
in the browser console.
I have the same error
@Vadimator , @tatsujb did you resolve this issue? I have the same error.
I did personally. sorry for not closing.
@tatsujb, Good that you personnaly were able to resolve your issue. It would be even better to share your solution to help other with the same issue.
it really doesn't look like me to not share what I did.
usually I always do for this exact case scenario. I'm really sorry about this.
I got this answer on stackoverflow : https://stackoverflow.com/a/50903097/4770754 perhaps that's what led me to close this issue, I don't remember right now.
I don't have much time right now but I suggest you read though it. it'll probably contain the fix.
The current Doc can't be understood.
How is this used? is there a point where you'll change parts of your DOM to integrate this library?
I don't see any examples relating to the DOM in the readme.
I'm in a case where I want to be able to translate a DOM tag which as text has a variable from it's component.
the variable, being... variable I functionalities that Angular i18n doesn't offer (as it only applies to static values), which, if I understand, this library is here to solve. (support for i18n for variable content)
but I see no example.
Another thing :
So you're using this library with Angular's i18n, ok, so far so good.
Is it an added layer or does it supplant some of Angular i18n's functionality?
Right now I followed your README and I end up with this for my
module.ts
:according to your README that's what I should be doing. It never says to remove elements that you were told to add by Angular's i18n Documentation.
Or that you will be using i18n differently now.
though I'm starting to suppose both of these are the case.
which is a good thing! ...But I just need to be told and be absolutely certain, this way implementing the library isn't an absolute shot in the dark.