I'm working with the mean.io starter project and I am trying to get a chart to display using zingchart.
When I inspect my code, I see a zingchart not defined error that looks like this.
I am new to using mean.io.
I should also mention that this is taking place in a new package that I created called "dashboard"
Here is my controller (dashboard.js):
(function() {
'use strict';
/* jshint -W098 */
angular
.module('mean.dashboard', ['zingchart-angularjs'])
.controller('DashboardController', function($scope) {
$scope.myJson = {
type : 'line',
series : [
{ values : [54,23,34,23,43] },
{ values : [10,15,16,20,40] }
]
};
});
})();
My html file (index.html):
<html ng-app="mean.dashboard" ng-init="checkCircle()">
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="zingchart.min.js"></script>
<script type="text/javascript" src="zingchart-angularjs.js"></script>
<script src="dashboard.js"></script>
<body ng-controller="DashboardController" ng-cloak layout="column">
<!-- graph here -->
<h1>Graph Test</h1>
<div ng-controller="DashboardController">
<div zingchart id="myChart" zc-json="myJson" zc-height=500 zc-width=600></div>
</div>
</div>
</div>
</body>
</html>
My app.js file:
'use strict';
/*
* Defining the Package
*/
var Module = require('meanio').Module;
var Dashboard = new Module('dashboard', ['zingchart-angularjs']);
/*
* All MEAN packages require registration
* Dependency injection is used to define required modules
*/
Dashboard.register(function(app, auth, database, circles) {
//We enable routing. By default the Package Object is passed to the routes
Dashboard.routes(app, auth, database, circles);
//We are adding a link to the main menu for all authenticated users
Dashboard.menus.add({
title: 'dashboard',
link: 'dashboard',
roles: ['authenticated'],
menu: 'main'
});
Dashboard.angularDependencies(['zingchart-angularjs']);
return Dashboard;
});

In case anyone else comes across this problem or one similar, I will post my answer.
Within the package/folder you want to add the zingchart dependency, or any dependency for that matter, you have to add it to your bower.json file like this.
then in your app.js file you need to register the zingchart dependency like this
you then need to make sure the zingchart dependency library is inlcuded in this path /public/assets/lib and make sure that this path is correctly referenced in your .bowerrc file like this
then you can proceed to add the code that creates and renders the actual chart in your controller.js file
and finally, you can reference this code in your html file like this