Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to use the gallerize directive in a container in which gallery items are added and removed dynamically. #599

Open
haykoaghababyan opened this issue Jan 25, 2024 · 2 comments

Comments

@haykoaghababyan
Copy link

I want to use the Gallerize Directive in a dynamically changing image container, when the first image is uploaded, that image is detected and a click event is added to it, when the second image is uploaded, a click event is added to the first element for the second time, and to the second element on the first time, how can it be done so that the click event does not occur on the first element the second time, because when I click on that element, a lightbox opens twice

@MurhafSousli
Copy link
Owner

MurhafSousli commented Jan 26, 2024

Gallerize was initially meant for HTML content received from an API, where developers don't have control over the incoming content template.

If you have control over the content, why not use the [lightbox] directive? https://ngx-gallery-next.netlify.app/?path=/docs/documentations-lightbox--docs#3-add-lightbox-on-each-thumbnail-in-your-template

@haykoaghababyan
Copy link
Author

Thanks, I tried and it worked !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants