Is it possible to define multiple controllers for a particular view?
I know how to define one but what if I want to use multiple controllers for better organization?
.state('dashboard', { parent: 'template', url: '/dashboard', views: { "content": { templateUrl: '/views/partials/dashboard.html' }, "menu": { templateUrl: '/views/partials/graphs-menu.html', controller: 'projectsCtrl' }, "sidebar": { templateUrl: '/views/partials/activity-monitor.html', controller: 'activityMonitorCtrl' }
Nope, just one each. If you want multiple controllers to apply to the same content area, use nested views.
Also, what if I don't use views for a particular state?
.state('template', {
abstract: true,
url: '/home',
templateUrl: '/views/partials/template.html',
controller: 'templateCtrl'
For open-ended help and discussion questions, please see the links provided in the readme. The GitHub issue tracker is not a support forum. Thanks.