Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ngx-translate TranslateService.get doesn't work in Lazyloaded pages

$
0
0

@Ionize wrote:

Hi,

This is weird, I recently used ngx-translate and everything is working fine on the pages using the pipe, but the translateService doesn't work. Anyone got any leads if this is working for them?

Thanks.

//Pipe works as expected
<p>{{ 'LOGOUT' | translate }}</p>

//Translate service doesn't!
this.translateService.get('LOGOUT').subscribe((res: string) => {
    console.log(res); //prints LOGOUT and not Logout.
});

**en.json**
{
  "LOGOUT": "Logout"
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>