-
Notifications
You must be signed in to change notification settings - Fork 70
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
Angular 11 Renderer2 issue? #91
Comments
I manually changed the declarations from Renderer to Renderer2 and this error is gone, but the second error is still |
Angular 12.2.4 w/ ngx-lightbox 2.0.0 here. Changing the import in the lightbox.component.ts and lightbox-overlat.component.ts files worked for me. BUT you have to also change the constructor as well so _rendererRef is an instance of Renderer2.
One I did that, everything worked fine. There could still be an issue with the Renderer methods/properties not matching Renderer2 100%, but at least with a bare minimum app, it compiled. Renderer2 is supposed to be available with Angular 8, the minimum for ngx-lightbox 2.0.0, so in theory that is all that would need to change. I'd put in a PR for this since it looks like such an easy and simple fix, but I'm not sure what else would break. Maybe I will anyway. The worst that can happen is the devs decline the PR. Hope that helps. |
Apparently, what started the issue for me was the latest version |
I can't seem to get this to work in Angular 11, I have a very basic setup using the instructions in the README but I get the following errors:
Any ideas?
The text was updated successfully, but these errors were encountered: