Topic: Trigger Lightbox Slideshow From A Button
How can I trigger the lightbox slideshow from a button click event?
Konrad Stępień staff answered 5 years ago
Hi @krakow47,
please make a new ViewChild like this:
@ViewChild('lightbox', { static: true }) lightbox: ImageModalComponent;
then you can run command like this:
this.lightbox.openGallery(1);
Please try this code and tell me if you have problems.
Best, Kornad.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 9.2.0
- Device: Web
- Browser: Firefox
- OS: Windows 10
- Provided sample code: No
- Provided link: No