Reputation: 169
Just added angular-chartist to my app and am now getting the following error:
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
I think this error occurs when I define the angular app:
//define Angular app
var routerApp = angular.module("routerApp", ["ui.router", "angular-chartist"]);
Did I set up something incorrectly?
The following code also deals 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);
};
You can find docs for angular-chartist here
Upvotes: 1
Views: 335
Reputation: 26
Make sure you also include chartist.js
in your index.html
, anywhere before angular-chartist
:
<script type="text/javascript" src="bower_components/chartist/dist/chartist.min.js"></script>
Upvotes: 1