I have been trying to use lightGallery in my Angular 4 project, I am able to make it work by adding these to the index.html file
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/lightgallery.min.js"></script>
and then
<script>
lightGallery(document.getElementById('lightgallery'));
</script>
Problem How do I use the lightGallery within angular code (typescript), as I can invoke lightGallery() upon loading the (dynamic content)pictures?
I have tried many options like this
or How can I use custom JavaScript code in an angular component?