-
Notifications
You must be signed in to change notification settings - Fork 80
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
Error: Cannot read property 'nativeElement' of undefined at ZoomableImage. #22
Comments
@peluqui2010 Try to empty your cache, or delete the www folder then type ionic serve . and it should works , in addition i added a style to the page in order to allow the scrolling image after zooming /* "use strict";
}()); |
nice its worked!! but i cant run "ionic run android --prod"... |
i didnt get into this level yet, i think faster solution is to uninstall the ionic-gallery-modal , compile your production android , After it reinstall the module and copy the main.js manually to folder platform android |
ok thanks for all!! |
Fixed in version 0.1.0 |
this.element.nativeElement.getElementByClassName is not a function i got this error any idea guys |
Hello,
I get an error using latest ionic version.
When I click on image to open the gallery I receive this exception:
Error: Cannot read property 'nativeElement' of undefined at ZoomableImage.
i tried @michelmouallem
// Solution : , Please open node_modules => ion-gallery-modal => zoomable-image
on line 49 replace
this.scrollableElement = this.ionScrollContainer['_elementRef'].nativeElement.querySelector('.scroll-content');
TO
this.scrollableElement = document.getElementsByClassName(".scroll-content"); zoomable-image
On line 62 replace
this.scrollableElement.removeEventListener('scroll', this.scrollListener);
TO
document.removeEventListener('scroll', this.scrollableElement , (event) => {
this.scrollEvent.bind(this);
});
On line 75 replace
this.scrollableElement.addEventListener('scroll', this.scrollListener);
TO
document.addEventListener('scroll', this.scrollableElement , (event) => {
this.scrollEvent.bind(this);
});
Enjoy !!!!! //
But i have the same exception..
The text was updated successfully, but these errors were encountered: