当我使用ngx-echarts的时候,我得到了这个。当使用4.x.x版本时,一切都很好。在npm之后,应用程序无法运行。
发布于 2021-07-26 14:25:07
@Arokia提出的解决方案不适用于我,它在build中产生了错误。
所以我找到了这个:
export function chartModule(): any {
return import('echarts');
}在NgModule中:
NgxEchartsModule.forRoot({
echarts: chartModule
}),对我来说是完美的。来源:https://github.com/xieziyu/ngx-echarts/issues/241#issuecomment-742777787
发布于 2020-07-30 15:06:12
问题在于ngxe图表中的版本更新。如果使用版本>5.0,请在app.module中使用此
NgxEchartsModule.forRoot({
echarts: { init: echarts.init }
})在tsconfig.json中的角编译器选项中也添加此选项
"enableIvy": falsehttps://stackoverflow.com/questions/63176047
复制相似问题