[Solved] Expression has changed after it was checked. when I click on a tab after using ngx-translate.use


#1

I’m using latest ngx-translate with latest ionic and translation works fine (forked app from ionic-starter-super). I’m also using TranslateProvider.use(lang) inside settings page, and it works fine when I change the language. But when I go to any other page, I get the following error:
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'NEW_LANGUAGE'. Current value: 'OLD_LANGUAGE'.

I think that happens because the tabs titles change to the new language in settings page, but not switch to the new language in other pages.


#2

Sorry, My mistake, I found that I was using translateService.use() in a pipe by mistake that was overriding the language.