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
I cannot use ngx-lightbox in standalone component with Angular 15.
However, I imported LightboxModule in my component.
I get the following error:
attachments.service.ts:100 ERROR NullInjectorError: R3InjectorError(Environment Injector)[LightboxWindowRef -> LightboxWindowRef]:
NullInjectorError: No provider for LightboxWindowRef!
at NullInjector.get (core.mjs:7493:27)
at R3Injector.get (core.mjs:7914:33)
at R3Injector.get (core.mjs:7914:33)
at ChainedInjector.get (core.mjs:12084:36)
at lookupTokenUsingModuleInjector (core.mjs:3201:39)
at getOrCreateInjectable (core.mjs:3246:12)
at Module.ɵɵdirectiveInject (core.mjs:10041:12)
at NodeInjectorFactory.LightboxComponent_Factory [as factory] (lightbox.component.js:568:272)
at getNodeInjectable (core.mjs:3431:44)
at createRootComponent (core.mjs:12297:35)
The text was updated successfully, but these errors were encountered:
in case anyone else stumbles upon this, make sure the dependency is injected in the constructor as public; at least that's what solved the problem for me.
I cannot use ngx-lightbox in standalone component with Angular 15.
However, I imported LightboxModule in my component.
I get the following error:
The text was updated successfully, but these errors were encountered: