app.module.ts
import {
TranslatePipe,
TranslateModule,
TranslateService,
TranslateLoader,
TranslateStaticLoader,
MissingTranslationHandler
} from "ng2-translate/ng2-translate";
@NgModule({
declarations: [
MyApp
],
imports: [
IonicModule.forRoot(MyApp, {}),
HttpModule,
TranslateModule.forRoot({
provide: TranslateLoader,
useFactory: (http: Http) => new TranslateStaticLoader(http, "../../www/assets/i18n", ".json"),
deps: [Http]
}),
StoreModule.provideStore(rootReducer)
]..
Error
Above does not work with ng2-final. I get:
03:26:44] ngc: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 98:25 in the original .ts file), resolving symbol AppModule in /Users/me/devel/mega-project/.tmp/app/app.module.ts
Expected behaviour
Implementation should work like before on RC4, e.g.:
<div style="text-transform:none">{{ "§GLOBAL.PHONE_CALL_FREE" | translate }}</div>