use ngx-translate in .ts file
Please do not use the forkJoin
operator in this case. ngx-translate supports fetching multiple translations at once by passing an array of keys to the get()
method like this:
translate.get(['HOME', 'MY_ACCOUNT', 'CHANGE_PASSWORD']).subscribe(translations => {
this.pages= [
{ title: translations.HOME, component: HomePage},
{ title: translations.MY_ACCOUNT, component: MyAccountPage},
{ title: translations.CHANGE_PASSWORD, component: ChangePasswordPage}
];
})
Edit:
Here you can find all supported methods and their signature.