fix: reorder ngx-translate dependencies in package.json and package-lock.json
refactor: update app.config.ts to use provideTranslateHttpLoader for translation configuration
This commit is contained in:
1 parent
a7418b5b02
commit
bf71d38ec1
3 files changed
+10
-16
No files matched your search
Generated
+1
-1
@@ -24,8 +24,8 @@
|
||||
"@fortawesome/free-brands-svg-icons": "^7.0.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^7.0.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
||||
"@ngx-translate/http-loader": "^17.0.0",
|
||||
"@ngx-translate/core": "^17.0.0",
|
||||
"@ngx-translate/http-loader": "^17.0.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
|
||||
+2
-2
@@ -47,8 +47,8 @@
|
||||
"rxjs": "~7.8.0",
|
||||
"tslib": "^2.3.0",
|
||||
"typescript-eslint": "^8.46.3",
|
||||
"@ngx-translate/http-loader": "^17.0.0"
|
||||
"@ngx-translate/core": "^17.0.0",
|
||||
"@ngx-translate/http-loader": "^17.0.0",
|
||||
"@ngx-translate/core": "^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^20.3.7",
|
||||
|
||||
+7
-13
@@ -12,9 +12,8 @@ import { provideClientHydration, withEventReplay } from '@angular/platform-brows
|
||||
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
import { imageCacheInterceptor } from './interceptors/image-cache.interceptor';
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { provideTranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -29,15 +28,10 @@ export const appConfig: ApplicationConfig = {
|
||||
}),
|
||||
// Provide ngx-translate through importProvidersFrom so it is available
|
||||
// for standalone component templates via the translate pipe.
|
||||
importProvidersFrom(
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useFactory: (http: HttpClient) =>
|
||||
new TranslateHttpLoader(http, '/assets/i18n/', '.json'),
|
||||
deps: [HttpClient],
|
||||
},
|
||||
}),
|
||||
),
|
||||
importProvidersFrom(TranslateModule.forRoot()),
|
||||
provideTranslateHttpLoader({
|
||||
prefix: '/assets/i18n/',
|
||||
suffix: '.json',
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in new issue
Block a user