Skip to content

Instantly share code, notes, and snippets.

@Tuizi
Created September 21, 2017 14:09
Show Gist options
  • Save Tuizi/4efec794c16d2f7df541ed56bfdb139f to your computer and use it in GitHub Desktop.
Save Tuizi/4efec794c16d2f7df541ed56bfdb139f to your computer and use it in GitHub Desktop.
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/home/', '.json');
}
@NgModule({
imports: [
CommonModule,
HomeRoutingModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: (createTranslateLoader),
deps: [HttpClient]
},
isolate: true
})
],
declarations: [HomeComponent]
})
export class HomeModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment