I’m having issues with a number of Angular data grid plugins… I’ve tried Angular DataTables, PrimeNG, Ngx-Datatable, Ag-Grid, Mat-Table and Kendo UI…
Every package after setup I get the following error… with the error varying between the different packages at the line in bold.
Error: NG0203: inject() must be called from an injection context such
as a constructor, a factory function, a field initializer, or a
function used withrunInInjectionContext
. Find more at
https://angular.dev/errors/NG0203
at injectInjectorOnly (core.mjs:1099:15)
at ɵɵinject (core.mjs:1112:42)
at ɵɵdirectiveInject (core.mjs:11391:16)
at NodeInjectorFactory.DatatableComponent_Factory [as factory] (swimlane-ngx-datatable.mjs:7164:43)
at getNodeInjectable (core.mjs:6061:44)
at instantiateAllDirectives (core.mjs:12265:27)
at createDirectivesInstances (core.mjs:11661:5)
at ɵɵelementStart (core.mjs:24344:9)
at Module.ɵɵelement (core.mjs:24402:5)
at CustomersFraudListComponent_ngx_datatable_5_Template (customers-fraud-list.component.html:7:1)
Not sure if I’m missing something here or what is need to help solve this problem. I know everybody out there has added datatables to their angular applications and there is no way I’m the only person who has experienced this issue… I’ve been staring at this working through all these different tools for probably more than 12 hours, I’m pretty certain there is something wrong in setup I’m missing if it’s happening across all plugins.
If you need more information, just ask and I can modify the question