We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package.json
"@angular/animations": "12.2.3", "@angular/cdk": "12.2.3", "@angular/common": "12.2.3", "@angular/compiler": "12.2.3", "@angular/core": "12.2.3", "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0",
app.module.ts
import { CommonModule } from '@angular/common'; import {HttpClient, HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'; import { NgModule,APP_INITIALIZER } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { UpgradeModule } from '@angular/upgrade/static'; import { GioPendoModule, GIO_PENDO_SETTINGS_TOKEN } from '@gravitee/ui-analytics'; import { UIRouterUpgradeModule } from '@uirouter/angular-hybrid'; import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateHttpLoader } from "@ngx-translate/http-loader"; import { TranslationService } from './services/translation.service'; import { uiRouterStateProvider, uiRouterStateParamsProvider, currentUserProvider, ajsRootScopeProvider } from './ajs-upgraded-providers'; import { Constants } from './entities/Constants'; import { ManagementModule } from './management/management.module'; import { OrganizationSettingsModule } from './organization/configuration/organization-settings.module'; import { httpInterceptorProviders } from './shared/interceptors/http-interceptors'; export function translationInitializer(translationService: TranslationService) { return function () { return translationService.init('en'); }; } @NgModule({ imports: [ CommonModule, BrowserModule, BrowserAnimationsModule, HttpClientModule, // Explicitly disable automatic csrf handling as it will not work for cross-domain (using custom csrf interceptor). HttpClientXsrfModule.withOptions({ cookieName: 'none', headerName: 'none', }), TranslateModule.forRoot({ defaultLanguage: 'en', loader: { provide: TranslateLoader, useFactory: (http: HttpClient) => new TranslateHttpLoader(http, './assets/i18n/'), deps: [HttpClient] }, }), ], providers: [ { provide: APP_INITIALIZER, useFactory: translationInitializer, deps: [TranslationService], multi: true } ], }) export class AppModule { constructor(private upgrade: UpgradeModule) { } ngDoBootstrap() { this.upgrade.bootstrap(document.documentElement, ['gravitee-management'], { strictDi: true }); } }
errro: Error: [$injector:unpr] Unknown provider: translateProvider <- translate
The text was updated successfully, but these errors were encountered:
No branches or pull requests
package.json
app.module.ts
errro:
Error: [$injector:unpr] Unknown provider: translateProvider <- translate
The text was updated successfully, but these errors were encountered: