Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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');
imports: [
// imports go here
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