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

Cannot read property 'id' of undefined

Open tjpatange opened this issue 7 years ago • 1 comments

During development mode lightbox works perfectly fine. But during --prod it gives the error:

Cannot read property 'id' of undefined

I tried various ways to solve it, but could not resolve.

Please look at my code below which opens the lightbox:

open_lightBox(index: number, imageUrl: string) { this._albums = []; const album = { src: imageUrl }; this._albums.push(album); this._lightbox.open(this._albums, index); } I'm displaying one image at a time, since this is my requirement and that's why I'm clearing the albums object at the start of the method. I'm using latest version of Angular Cli

tjpatange avatar Sep 12 '18 15:09 tjpatange

Which angular version are u using with ?

themyth92 avatar Sep 13 '18 03:09 themyth92