Created
September 14, 2018 12:11
-
-
Save lydemann/85dc809eda8d975ba9cce5d790434c68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; | |
import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; | |
export function HttpLoaderFactory(httpClient: HttpClient) { | |
return new TranslateHttpLoader(httpClient, environment.feServerUrl + '/assets/i18n/', '-lang.json'); | |
} | |
@NgModule({ | |
imports: [ | |
// imports go here | |
TranslateModule.forRoot({ | |
loader: { | |
provide: TranslateLoader, | |
useFactory: HttpLoaderFactory, | |
deps: [HttpClient] | |
} | |
}) | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment