Ionic 3.01 Lazy Module : The pipe 'translate' could not be found
See original GitHub issue**I’m submitting a issue because since the updated Ionic 3.0.0 the ngx-translate cannot be used with ionic lazy loading system.
Current behavior
When i load the page lazy loaded i get :
Uncaught (in promise): Error: Template parse errors: The pipe 'translate' could not be found (" <ion-header> <ion-navbar color="primary" hideBackButton="true"> <ion-title>{{[ERROR ->]"login.title"|translate}}</ion-title> </ion-navbar> </ion-header> "): ng:///LoginModule/LoginPage.html@8:17
Expected/desired behavior
Reproduction of the problem Load the webapp using : ionic serve
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
-
ngx-translate version: 6.0.1
-
Angular version: 4.0.0
-
Browser: [all ]
Issue Analytics
- State:
- Created 6 years ago
- Comments:13
Top GitHub Comments
Make sure to import
TranslateModule
in your lazy loaded module as well. Or better, addTranslateModule
to aSharedModule
and import thatSharedModule
to every feature module.Finally i have solved my problem by adding :
And drawing inspiration from : https://github.com/ngx-translate/core/issues/209
Thanks @SamVerschueren