Created
September 21, 2017 14:09
-
-
Save Tuizi/4efec794c16d2f7df541ed56bfdb139f 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
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