Our Angular2 application is using a translation service to provide translation, like this
getResourceValue(resKey: string): string {
return this.translateService.getResourceValue(resKey);
}
The service get the translation async from API calls with each component loaded. An observable is holding all the translation async. If the translation for that key is not ready, it just returns the key. And then updates it with the right string when the translation is ready.
in Template:
getResourceValue('Page-Title')
Which works fine.
But some pages have "ChangeDetectionStrategy.OnPush". These pages won't trigger change detection when the translation data changes. Everything works without that setting.
My question is: are there ways to force the detection somewhere only for the translation?