KroneCorylus / ngx-colors

Simple yet elegant Material color picker for Angular
https:\\ngx-colors.web.app
MIT License
88 stars 24 forks source link

Angular 14 Dependency Conflict #81

Closed Ujjwal-Kandel closed 1 year ago

Ujjwal-Kandel commented 1 year ago

ngx-colors^3.1.4 doesn't work with Angular 14. It gives me the Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments. error. @3.1.4 works fine but I needed to use the validColorValidator in my reactive form.


Error: node_modules/ngx-colors/lib/directives/slider.directive.d.ts:23:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

23     static ɵdir: i0.ɵɵDirectiveDeclaration<SliderDirective, "[slider]", never, { "rgX": "rgX"; "rgY": "rgY"; "slider": "slider"; }, { "dragEnd": "dragEnd"; "dragStart": "dragStart"; "newValue": "newValue"; }, never, never, false, never>;

Error: node_modules/ngx-colors/lib/ngx-colors.component.d.ts:13:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

13 static ɵcmp: i0.ɵɵComponentDeclaration<NgxColorsComponent, "ngx-colors", never, {}, {}, never, never, false, never>;



** Angular Live Development Server is listening on 192.168.1.74:4201, open your browser on http://192.168.1.74:4201/ **

× Failed to compile.
KroneCorylus commented 1 year ago

Hi @Ujjwal-Kandel Apparently the libraries made with Angular 15 are not compatible with projects made with Angular 14. Now I will reflect it in the documentation and in the dependencies.

Maybe you should consider upgrading to version 15 of angular, if not possible you could manually implement the validator by copying it from here valid-color.validator.ts