ngx-lightbox icon indicating copy to clipboard operation
ngx-lightbox copied to clipboard

modal isn't opening

Open moshebengan opened this issue 4 years ago • 4 comments

I'm loading the photos via http get request from server i've created i'm storing the json to new array of objects - every object have src, caption, thumb. (src and thumb - same photo) the gallery looks good - but when tapping on the thumbnail - modal isn't opened - page scroller is expanded.

i'm using angular cli 9.0.4, ngx-lightbox 2.1.2

maybe the bug caused because i'm setting the array of objects on ngOninit - not like the example - where the array of objects was set on the constructor?

files are attached

birdsGalleryFe.zip

moshebengan avatar Mar 05 '20 08:03 moshebengan

maybe the bug caused because i'm setting the array of objects on ngOninit

I dont think that is the problem. Do you have any errors in your console ?. Do you call this._lightbox.open(this._albums, index); like in the example ?

themyth92 avatar Mar 09 '20 03:03 themyth92

no errors, and i call it exactly like the example

moshebengan avatar Mar 09 '20 08:03 moshebengan

Then maybe it is a problem with CSS, maybe the css is conflicting with your current CSS. Check your DOM if these contents are added: Screenshot 2020-03-09 at 4 56 00 PM

Also do you include lightbox.css ?

themyth92 avatar Mar 09 '20 08:03 themyth92

This should be definitely lack of css. I had the same issue today. Please add css to styles in angular.json as here: image

@themyth92 , this divs are visible at the bottom of tree dom so it should work for him.

piotrzuzak avatar Jun 27 '20 19:06 piotrzuzak