diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 192837186..381301e55 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -38,6 +38,9 @@ import { SidenavComponent } from './shell/sidenav/sidenav.component'; import { ToolbarComponent } from './shell/toolbar/toolbar.component'; import { BreadcrumbComponent } from './shell/breadcrumb/breadcrumb.component'; import { ContentComponent } from './shell/content/content.component'; +import { InjectionToken } from '@angular/core'; +import { APP_BASE_HREF, LocationStrategy } from '@angular/common'; + /** * Core Module @@ -51,10 +54,10 @@ import { ContentComponent } from './shell/content/content.component'; TranslateModule.forRoot({ loader: { provide: TranslateLoader, - useFactory: (http: HttpClient) => { - return new TranslateHttpLoader(http, `${ window.location.protocol }//${ window.location.host }/assets/translations/`, '.json'); + useFactory: (http: HttpClient, locationStrategy: LocationStrategy) => { + return new TranslateHttpLoader(http, `${ window.location.protocol }//${ window.location.host }${locationStrategy.getBaseHref()}/assets/translations/`, '.json'); }, - deps: [HttpClient] + deps: [HttpClient, LocationStrategy] } }), RouterModule diff --git a/src/karma.conf.js b/src/karma.conf.js old mode 100644 new mode 100755