I'm trying to make this work in a Nativescript/Angular application (with Typescript). I have a setup with an application module, a child module (tab module), built from the tab-component template that comes with Nativescript. I'm not sure how to add this to my @NgModule declaration? Do I need to add it to the application module or the tab module? Or both? Where do I put the code that you have in this block:
nativeScriptBootstrap(TestComponent, [
HTTP_PROVIDERS,
provide(TranslateLoader, {
useFactory: () => {
// pass in the path to your locale files
return new TNSTranslateLoader('assets/i18n');
}
}),
TranslateService
]);
?
PS: I also tried plain ng2-translate but the |translate pipe never worked for me. Perhaps because it couldn't load the translation files?
Hi,
I'm trying to make this work in a Nativescript/Angular application (with Typescript). I have a setup with an application module, a child module (tab module), built from the tab-component template that comes with Nativescript. I'm not sure how to add this to my @NgModule declaration? Do I need to add it to the application module or the tab module? Or both? Where do I put the code that you have in this block:
?
PS: I also tried plain ng2-translate but the |translate pipe never worked for me. Perhaps because it couldn't load the translation files?