MurhafSousli / ngx-gallery

Angular Gallery, Carousel and Lightbox
https://ngx-gallery.netlify.app/
MIT License
610 stars 129 forks source link

`ng-gallery` not working with Angular 15.1.0 #571

Closed cmschandan closed 1 year ago

cmschandan commented 1 year ago

What is the expected behavior?

The expected behavior should be that it should show the preview of the lightbox because I am showing the image using our pre-signed URL but it is showing errors like :

What is the current behavior?

Error: node_modules/ng-gallery/lib/components/templates/gallery-image.component.d.ts:34:91 - error TS2344: Type '{ isThumbnail: { alias: "isThumbnail"; required: false; }; loadingAttr: { alias: "loadingAttr"; required: false; }; alt: { alias: "alt"; required: false; }; src: { alias: "src"; required: false; }; loadingIcon: { ...; }; loadingError: { ...; }; errorIcon: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"isThumbnail"' is incompatible with index signature. Type '{ alias: "isThumbnail"; required: false; }' is not assignable to type 'string'.

34 static ɵcmp: i0.ɵɵComponentDeclaration<GalleryImageComponent, "gallery-image", never, { "isThumbnail": { "alias": "isThumbnail"; "required": false; }; "loadingAttr": { "alias": "loadingAttr"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "src": { "alias": "src"; "required": false; }; "loadingIcon": { "alias": "loadingIcon"; "required": false; }; "loadingError": { "alias": "loadingError"; "required": false; }; "errorIcon": { "alias": "errorIcon"; "required": false; }; }, { "error": "error"; "loaded": "loaded"; }, never, never, true, never>;


Error: node_modules/ng-gallery/lightbox/lightbox.directive.d.ts:16:84 - error TS2344: Type '{ index: { alias: "lightbox"; required: false; }; id: { alias: "gallery"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"index"' is incompatible with index signature. Type '{ alias: "lightbox"; required: false; }' is not assignable to type 'string'.

16 static ɵdir: i0.ɵɵDirectiveDeclaration<LightboxDirective, "[lightbox]", never, { "index": { "alias": "lightbox"; "required": false; }; "id": { "alias": "gallery"; "required": false; }; }, {}, never, never, true, never>;



Error: src/app/pages/surveyors/ihm-checks/ihm-checks.component.html:586:22 - error NG8002: Can't bind to 'lightbox' since it isn't a known property of 'div'.

586                      [lightbox]="i">

#### What are the steps to reproduce?

<!-- 
Providing a StackBlitz reproduction is the *best* way to share your issue. <br/>
StackBlitz starter: https://stackblitz.com/edit/ngx-gallery<br/>
-->

#### What is the use-case or motivation for changing an existing behavior?

#### Which versions are you using for the following packages?
I am using a version of ng-gallery 11.0.0.
Angular:
Angular CDK:
Angular CLI:
Typescript:
Gallery: 

#### Is there anything else we should know?
I am using this package for my angular PWA Application and this preview is showing inside a popup form .
MurhafSousli commented 1 year ago

For Angular 15, use v9.0.1 https://github.com/MurhafSousli/ngx-gallery/blob/master/CHANGELOG.md#901