tolgee-js
tolgee-js copied to clipboard
Outdated way how to provide injection tokens in Angular & outdated documentation for Angular
Is your feature request related to a problem? Please describe.
You have already described only module based Angular aproach, which were abondonned by Angular team 2 years ago.
See your docs
Describe the solution you'd like
You should do something like this:
export const appConfig: ApplicationConfig = {
providers: [
provideTolgee({
config: {
cdnUrl: environment.tolgee.cdnUrl,
defaultLang: DEFAULT_LANGUAGE,
languages: LANGUAGE_OPTIONS,
localStorageKey: 'tolgeeLang',
},
options: {
apiUrl: environment.tolgee.apiUrl,
apiKey: environment.tolgee.apiKey,
availableLanguages: AVAILABLE_LANGUAGES,
fallbackLanguage: DEFAULT_LANGUAGE,
defaultLanguage: DEFAULT_LANGUAGE,
},
}),
};
or something like
provideTolgee({ /* config */ }, withDevTools(), withFormatSimple()),
Why? Because of the type-safety ...
Describe alternatives you've considered
None
Additional context
None
Thank you for reporting this issue.
Moving this issue to https://github.com/tolgee/tolgee-js due to the Angular integration code being maintained in that repository.
Thank you for helping improve Tolgee's Angular integration! 🚀