core
core copied to clipboard
Angular 14 support?
Is Angular 14 supported by this package?
Any news?
It should work just fine with the existing latest version. Let me know if you have any issue
I thought so since it's targeting "@angular/core": ">=13.0.0" and I can confirm after trying it that it's working just fine.
I just upgraded Angular from v13 to v14 and I'm getting the error: Error: NG0302: The pipe 'translate' could not be found in the 'the_component_name' component. Verify that it is declared or imported in this module.
which kinda does not make any sense since the diff that I can see in my repo between v13 and v14 does not contain any changes to the module files. The majority is about UntypedFormGroup, UntypedFormControl and similar. The only other change is in my main tsconfig.json which have changed the "target": "es5"
to "target": "es2020"
. Each of my modules contains TranslateModule
in the imports
section as it did with v13.
Maybe anybody seen something similar?
Same here. I updated to Angular v14.
"@angular/core": "^14.2.3",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
I can compile and start the peoject. In the browser I see the same Error:
Error: NG0302: The pipe 'translate' could not be found in the 'LoginComponent' component.
Edit: It works now: I have overlooked a dependency where @ngx-translate/core version 13 was still used.
Same Here core.mjs:7635 ERROR Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with
Is Angular 14 supported by this package?
Yes, Angular 14 is supported.
Error: node_modules/@ngx-translate/core/dist/lib/translate.directive.d.ts:25:18 - error TS2707: Generic type ‘ɵɵDirectiveDeclaration’ requires between 6 and 8 type arguments. 25 static ɵdir: i0.ɵɵDirectiveDeclaration<TranslateDirective, “[translate],[ngx-translate]“, never, { “translate”: { “alias”: “translate”; “required”: false; }; “translateParams”: { “alias”: “translateParams”; “required”: false; }; }, {}, never, never, false, never>;
Error: Command “npm run build” exited with 1
Any idea? Deploy failed and this is error
For anyone having the same issue, you can solve it this way:
Navigate to -> node_modules/@ngx-translate/core/dist/lib/translate.directive.d.ts
Replace line 25 with this code:
static ɵdir: i0.ɵɵDirectiveDeclaration<TranslateDirective, "[translate],[ngx-translate]", never, { 'translate': 'translate'; 'translateParams': 'translateParams'; }, {}, never, never, false, never>;
@martinabdulghni solution worked for me !