I have a hybrid app which has pascalprecht.translate in the AngularJS side and I am trying to introduce ngx-translate to the Angular side.
On doing some console logging, I found that the different language's json files are correctly loaded which means the loader must be correctly working. It's just that when I use that in my template as <a ... [translate]='I18N_ABOUT_PAGE_TABS_ABOUT'>, it simply converts to translate="yes" but no text would appear.
EDIT
I realized that if using HttpLoader, I should not use setTranslation and therefore I have removed that line. And it outputs the translation as expected, but only in the console. It still is blank in the template with translate="yes".
EDIT
Just to let you know, I already referred to #917 but it does not solve my use case since the issue was about using ngx-translate in AngularJS but I am looking to implement it correctly in the Angular part only
I have a hybrid app which has pascalprecht.translate in the AngularJS side and I am trying to introduce ngx-translate to the Angular side.
On doing some console logging, I found that the different language's json files are correctly loaded which means the loader must be correctly working. It's just that when I use that in my template as
<a ... [translate]='I18N_ABOUT_PAGE_TABS_ABOUT'>
, it simply converts totranslate="yes"
but no text would appear.I tried using the service way like this
It just outputs 'HELLO' which means it is not finding the translation even if it is right there.
Here is my root module.
Any help is appreciated! Thanks!
EDIT I realized that if using HttpLoader, I should not use
setTranslation
and therefore I have removed that line. And it outputs the translation as expected, but only in the console. It still is blank in the template withtranslate="yes"
.EDIT Just to let you know, I already referred to #917 but it does not solve my use case since the issue was about using ngx-translate in AngularJS but I am looking to implement it correctly in the Angular part only