打字稿中的JavaScript错误new()离子2

时间:2017-03-30 10:44:59

标签: angular ionic2

我正在研究这段代码:

....
this.charts.push(new Chart(document.getElementById("chart0"), {..}
...

HTML:

<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'.

可能是什么错误? 我必须在char0上使用ngModel?我不知道怎么做!

0 个答案:

没有答案