[英]Error: $injector:modulerr Module Error - chart.js
Trying to integrate chart.js
with AngularJS
but this error is showing: 尝试将
chart.js
与AngularJS
集成,但显示此错误:
Error: $injector:modulerr Module Error
. Error: $injector:modulerr Module Error
。 Failed to instantiate module chart.js
I know the is error is to do with where the link is declared in your header, but I have followed instructions from Angular Chart but to no avail. 我知道错误是与标题中声明链接的位置有关,但是我遵循了Angular Chart的说明,但无济于事。 Any idea why this error is being thrown?
知道为什么会引发此错误吗?
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-charts/0.2.7/angular-charts.min.js"></script>
<script src="scripts/app.js"></script>
var app = angular.module('myApp', ['ngRoute', 'angularMoment', 'ui.router', 'chart.js']);
Name of the chart module is angularCharts
. 图表模块的名称为
angularCharts
。 so inject it instead of the chart.js
所以注入它而不是
chart.js
var app = angular.module('myApp', ['ngRoute', 'angularMoment', 'ui.router', 'angularCharts']);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.