mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Fixed #1641
This commit is contained in:
parent
1b10eb92e7
commit
e66e617891
1 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
|||
import {PlatformLocation} from "@angular/common";
|
||||
import {HttpClient, HttpClientModule} from "@angular/common/http";
|
||||
import {NgModule} from "@angular/core";
|
||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||
|
@ -56,7 +57,11 @@ const routes: Routes = [
|
|||
];
|
||||
|
||||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient) {
|
||||
export function HttpLoaderFactory(http: HttpClient, platformLocation: PlatformLocation) {
|
||||
const base = platformLocation.getBaseHrefFromDOM();
|
||||
if (base.length > 1) {
|
||||
return new TranslateHttpLoader(http, `${base}/translations/`, ".json");
|
||||
}
|
||||
return new TranslateHttpLoader(http, "/translations/", ".json");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue