【发布时间】:2020-10-27 21:48:34
【问题描述】:
我在 Angular 7 应用程序中使用 ngx-echart。我正在关注链接中的示例: https://www.freakyjolly.com/angular-e-charts-using-ngx-echarts-tutorial/#.XwSANigzaUk
但是在执行(ng serve)应用程序并显示组件时,我收到以下错误:
错误错误:StaticInjectorError(AppModule)[NgxEchartsDirective -> InjectionToken NGX_ECHARTS_CONFIG]:StaticInjectorError(平台: 核心)[NgxEchartsDirective -> InjectionToken NGX_ECHARTS_CONFIG]: NullInjectorError:InjectionToken NGX_ECHARTS_CONFIG 没有提供程序! 在 NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8896) 在 resolveToken (core.js:9141) 在 tryResolveToken (core.js:9085) 在 StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982) 在 resolveToken (core.js:9141) 在 tryResolveToken (core.js:9085) 在 StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8982) 在 resolveNgModuleDep (core.js:21218) 在 NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21907) 在 resolveNgModuleDep (core.js:21218)
有什么想法吗?
谢谢
【问题讨论】:
标签: angular