在网上找了在ng-alain中使用echart,但是发现按着网上的步骤来,会一直的提示Can't bind to 'options' since it isn't a known property,然后我就发现import { NgxEchartsModule } from 'ngx-echarts' 这个不一定放在app.module.ts中,
就以直接下载的ng-alain demo为例,如果想在http://localhost:4200/#/dashboard 页面中使用 echart,则需要将 import { NgxEchartsModule } from 'ngx-echarts' 放在 routes.module.ts文件中 ,代码如下所示
哪个组件需要使用echarts,就将 import { NgxEchartsModule } from 'ngx-echarts' 放在那个module文件中