You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: