I am trying to use the monaco editor in a standalone component and lazy load it to avoid the chunk size of my module. Hope this usecase makes sense. I get the usual Angular dependency injection error.
Is there a way to solve it?
apps_configs_src_app_configuration-module_configuration_configuration_component_ts.js:2 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(Standalone[ConfigurationComponent])[InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG]:
NullInjectorError: No provider for InjectionToken NGX_MONACO_EDITOR_CONFIG!
NullInjectorError: R3InjectorError(Standalone[ConfigurationComponent])[InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG]:
NullInjectorError: No provider for InjectionToken NGX_MONACO_EDITOR_CONFIG!
at NullInjector.get (core.mjs:6359:27)
at R3Injector.get (core.mjs:6786:33)
at R3Injector.get (core.mjs:6786:33)
at R3Injector.get (core.mjs:6786:33)
at R3Injector.get (core.mjs:6786:33)
at R3Injector.get (core.mjs:6786:33)
at ChainedInjector.get (core.mjs:13769:36)
at lookupTokenUsingModuleInjector (core.mjs:3293:39)
at getOrCreateInjectable (core.mjs:3338:12)
at Module.ɵɵdirectiveInject (core.mjs:10871:12)
at resolvePromise (zone.js:1211:31)
at resolvePromise (zone.js:1165:17)
at zone.js:1278:17
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26218:33)
at _ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at drainMicroTaskQueue (zone.js:585:35)
I am trying to use the monaco editor in a standalone component and lazy load it to avoid the chunk size of my module. Hope this usecase makes sense. I get the usual Angular dependency injection error. Is there a way to solve it?
apps_configs_src_app_configuration-module_configuration_configuration_component_ts.js:2 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(Standalone[ConfigurationComponent])[InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG]: NullInjectorError: No provider for InjectionToken NGX_MONACO_EDITOR_CONFIG! NullInjectorError: R3InjectorError(Standalone[ConfigurationComponent])[InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG -> InjectionToken NGX_MONACO_EDITOR_CONFIG]: NullInjectorError: No provider for InjectionToken NGX_MONACO_EDITOR_CONFIG! at NullInjector.get (core.mjs:6359:27) at R3Injector.get (core.mjs:6786:33) at R3Injector.get (core.mjs:6786:33) at R3Injector.get (core.mjs:6786:33) at R3Injector.get (core.mjs:6786:33) at R3Injector.get (core.mjs:6786:33) at ChainedInjector.get (core.mjs:13769:36) at lookupTokenUsingModuleInjector (core.mjs:3293:39) at getOrCreateInjectable (core.mjs:3338:12) at Module.ɵɵdirectiveInject (core.mjs:10871:12) at resolvePromise (zone.js:1211:31) at resolvePromise (zone.js:1165:17) at zone.js:1278:17 at _ZoneDelegate.invokeTask (zone.js:406:31) at Object.onInvokeTask (core.mjs:26218:33) at _ZoneDelegate.invokeTask (zone.js:405:60) at Zone.runTask (zone.js:178:47) at drainMicroTaskQueue (zone.js:585:35)