my index.html file has the following :
<script src="scripts/controllers/form/DashboardCtrl.js" />
<script src="scripts/controllers/chart/morrisChartCtrl.js" />
my app.js file is as follows :
return $routeProvider.when('/', {
redirectTo: '/signin'
}).when('/dashboard', {
templateUrl: 'views/dashboard.html',secure: true
})
My dashboard page is as follows :
<div class="page page-dashboard" data-ng-controller="DashboardCtrl">
<div class="panel-body" data-ng-controller="morrisChartCtrl">
</div></div>
I can view the Dashboard page, but the morrisChartCtrl is not showing the chart.
My controller is defined as follows :
app.controller('morrisChartCtrl', function($scope) {
$scope.mainData = [
{
month: '2013-01',
xbox: 294000,
will: 136000,
playstation: 244000
}];
});
So I am not able to figure out why myController is not being called