Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'id' of undefined #63

Open
tjpatange opened this issue Sep 12, 2018 · 1 comment
Open

Cannot read property 'id' of undefined #63

tjpatange opened this issue Sep 12, 2018 · 1 comment

Comments

@tjpatange
Copy link

tjpatange commented Sep 12, 2018

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

@themyth92
Copy link
Owner

Which angular version are u using with ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants