ngx-datetime-range-picker
ngx-datetime-range-picker copied to clipboard
Using ngx-datetime-range-picker in my custom library triggers ERR_NGX_DATETIME_RANGE_PICKER: NgxDatetimeRangePickerModule is already loaded
I've created a custom library to reuse components among several applications, and I want to use ngx-datetime-range-picker in one of my library modules. The problem is, when I import my library module into one of the main application's lazy loaded module, it triggers the following error : ERR_NGX_DATETIME_RANGE_PICKER: NgxDatetimeRangePickerModule is already loaded. Import it in the AppModule only.
Is there a way to correctly import ngx-datetime-range-picker in a reusable module without forRoot ? (maybe by implementing a forChild method) ?
You can create a small wrapper module in application code-base (example: ngx-datetime-range-picker-wrapper.module) and then import it using ./ngx-datetime-range-picker-wrapper.module#NgxDatetimeRangePickerModule. I didn't get enough time to try this myself but please let me know if this works for you.
I ran into the same issue. Can you please explain a bit on the proposed solution above? I don't understand it.
Hello, I have the same problem and still found no solution. Could you please explain your proposal in detail, so that we can give it a try?