I read the documentation of the metronics theme for light box use. and followed the steps but it's not working fine in the angular project.
Hello,
May I know if you are referring to this docs page? The docs here is mostly only working for HTML version.
https://preview.keenthemes.com/html/metronic/docs/general/fslightbox
For angular, you may try this guide. To integrate fslightbox with Angular, you can follow these steps:
Install the fslightbox package using npm:
npm install fslightbox --save
import FsLightbox from "fslightbox";
lightbox = null;
ngOnInit() {
this.lightbox = new FsLightbox();
}
<button (click)="openLightbox()">Open Lightbox</button>
openLightbox() {
this.lightbox.open([...]); // add your image or video URLs inside the square brackets
}
close()
method of the lightbox instance:this.lightbox.close();