core icon indicating copy to clipboard operation
core copied to clipboard

Angular 14 support?

Open oixan opened this issue 2 years ago • 12 comments

Is Angular 14 supported by this package?

oixan avatar Jun 10 '22 15:06 oixan

Any news?

andreeapNRO avatar Jun 23 '22 10:06 andreeapNRO

It should work just fine with the existing latest version. Let me know if you have any issue

ocombe avatar Jun 23 '22 10:06 ocombe

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.

Jean-ChristopheL avatar Jun 23 '22 13:06 Jean-ChristopheL

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?

frontendbuddy avatar Sep 21 '22 14:09 frontendbuddy

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.

SynchroM avatar Sep 26 '22 13:09 SynchroM

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

javiermatias avatar Oct 04 '22 05:10 javiermatias

Is Angular 14 supported by this package?

qyjs avatar Oct 20 '22 02:10 qyjs

Yes, Angular 14 is supported.

SynchroM avatar Oct 20 '22 06:10 SynchroM

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

nokeludak avatar Aug 22 '23 08:08 nokeludak

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 avatar Sep 21 '23 12:09 martinabdulghni

@martinabdulghni solution worked for me !

harisjaved10 avatar Jan 24 '24 06:01 harisjaved10