core: Error, when using strictTemplates in Angular 9.
Enabling the new strictTemplates flag in Angular 9’s compiler options generates the following build error:
This likely means that the library (@ngx-translate/core) which declares TranslateModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to
see if the library is expected to be compatible with Ivy.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 10
- Comments: 25
Hi guys, this fixed the problem for me: npm cache verify
Remove the node modules rm -rf node_modules
And npm install again and it works properly.
@Shadab-97-eng see my updated code. This works fine for me now.
@mdudek I was able to fixit this way in the app module
TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: (http: HttpClient) => { return new TranslateHttpLoader(http, "./assets/i18n/", ".json"); }, deps: [HttpClient], }, }),