zone.js:680 Unhandled Promise rejection:chartModule不是函数

时间:2018-02-12 09:39:29

标签: angular highcharts angular-cli

我正在尝试导入一个使用highcarts的模块,并希望在我的cli app中渲染模块中的组件。

但是我收到了这个错误

我正在使用

    "@types/highcharts": "^5.0.16",
"angular": "^1.6.9",
"angular-highcharts": "^5.2.8",
"core-js": "~2.5.1",
"highcharts": "^6.0.6",

还有其他人遇到过这个问题吗?

export class LineStatisticsComponent {

chart = new Chart({

title: {
    text: 'sample chart '
},

1 个答案:

答案 0 :(得分:0)

我通过使用

获得了修复
ng serve --target=production --aot=true 

我不知道为什么会这样,但是

ng serve 

单独失败,错误图表模块不是一个功能 因此,如果有人了解为什么会出现这种行为,请告诉我