Closed
Description
I am implement ng2-translate into Ionic 2 project. At first, I am having build error. After I modify some variable declare to the code below, it has no issue during project build.
@App({
templateUrl: 'build/app.html',
config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: [
provide(TranslateLoader, {
useFactory: (http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
deps: [[Http]]
}),
TranslateService
],
pipes: [TranslatePipe]
})
Anyway, I am having property undefined issue now.
EXCEPTION: TypeError: Unable to get property 'title' of undefined or null reference in [ {{ "title" | translate }} in AccessPage@7:13
Below is my access page code
<ion-navbar *navbar>
<ion-title> {{ "title" | translate }} </ion-title>
</ion-navbar>
and my code in en.json.
{
"title" : "Testing",
}
so I am wondering the problem is because it couldn't find the en.json (located at www/assets/i18n folder) or some other issue.
Metadata
Metadata
Assignees
Labels
No labels