刚刚将角度图表添加到我的应用中,现在收到以下错误:
Failed to instantiate module routerApp due to:
Error: [$injector:modulerr] http://errors.angularjs.org/1.3.14/$injector/modulerr?p0=...)
at Error (native)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:6:417
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:35:320
at s (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:7:302)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:34:399)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:35:63
at s (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:7:302)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:34:399)
at ab (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:38:135)
at d (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:17:381
我认为在定义角度应用程序时会出现此错误:
//define Angular app
var routerApp = angular.module("routerApp", ["ui.router", "angular-chartist"]);
我是否错误地设置了某些内容?
以下代码也涉及角度图表:
//draw chart
var drawChart = function(results) {
var data = {
labels: [],
series: []
}
for (var i = 0; i < results.length; i++) {
data.labels.push(results[i].trait);
data.series.push(results[i].normalized);
}
new Chartist.Bar('.ct-chart ct-perfect-fourth', data);
};
您可以找到angular-chartist here
的文档