Use the directive [lightbox] to open the lightbox on elements clicks
Alternatively, you can still use the Lightbox service to open the lightbox
programmatically.
If you haven't installed the module in step 1 see the Getting Started Guide
Create a gallery items array to load it in the gallery
Now that you have gallery items, display their thumbnails in the template and add the directive [lightbox]
on each item so the clicks open the lightbox.
Example
If you are using multiple galleries in your app, then each gallery should have an id.
Full Example
Demo
Lightbox config can be set globally in LightboxModule.forRoot(config) or directly
with the open function.
By default, the lightbox uses full screen style on small screens like on mobile phones, but you can force a full screen style on large screens too.
For example, open the lightbox in mode
List of lightbox options is available in the