angular2-lightbox
angular2-lightbox copied to clipboard
Cannot read property 'id' of undefined
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
Which angular version are u using with ?