Help Needed: NG0203 Error with ng-apexcharts
Impre-visible opened this issue · 2 comments
Impre-visible commented
Hey everyone,
I'm facing an NG0203 error with ng-apexcharts in my Angular project, and I'm a bit stuck. The error occurs at line 31 in my line-chart.component.ts file, and I've shared the relevant code on this Pastebin link.
I've checked the imports, usage of ChartComponent, and circular dependencies, but no luck so far. If anyone has encountered this issue before or has some insights, I'd really appreciate your help.
The error is:
statistics.component.ts:180 ERROR Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203
at injectInjectorOnly (core.mjs:905:15)
at ɵɵinject (core.mjs:918:60)
at Module.ɵɵdirectiveInject (core.mjs:11987:16)
at NodeInjectorFactory.ChartComponent_Factory [as factory] (ng-apexcharts.mjs:163:119)
at getNodeInjectable (core.mjs:4862:44)
at instantiateAllDirectives (core.mjs:12629:27)
at createDirectivesInstances (core.mjs:12045:5)
at ɵɵelementStart (core.mjs:16336:9)
at Module.ɵɵelement (core.mjs:16394:5)
at LineChartComponent_Template (line-chart.component.ts:31:32)
Thanks a bunch!
damingerdai commented
cloud you provide the mini repo?
github-actions commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.