Angular 类型脚本中的JavaScript错误new()2
我对这条代码感到惊讶:Angular 类型脚本中的JavaScript错误new()2,angular,ionic2,Angular,Ionic2,我对这条代码感到惊讶: .... this.charts.push(new Chart(document.getElementById("chart0"), {..} ... Html: 可能是什么错误? 我必须在char0上使用ngModel?我不知道怎么做 您导入了图表吗?@noggin182如何导入图表??我只有这个:导入'chart.js'; <ion-row><canvas id="chart0" style="width:512px;height:320px"&g
....
this.charts.push(new Chart(document.getElementById("chart0"), {..}
...
Html:
可能是什么错误?
我必须在char0上使用ngModel?我不知道怎么做 您导入了图表吗?@noggin182如何导入图表??我只有这个:导入'chart.js';
<ion-row><canvas id="chart0" style="width:512px;height:320px"></canvas>
<canvas id="chart0" style="width:512px;height:320px"></canvas>
<canvas id="chart1" style="width:512px;height:320px"></canvas>
</ion-row>
Cannot find name 'Chart'.