Is it possible to attach multiple controllers to a single route, perhaps in the form of an array?
For example, in '/store', I would like to attach both "StoreController" and "ReviewController" without having to repeat the .when() function multiple times:
This is what my code currently looks like:
angular
.module('gemStore', [
'example-directives'
])
.config(function ($routeProvider) {
$routeProvider
.when('/store', {
templateUrl: 'store.html',
controller: ['StoreController', 'ReviewController']
})
.otherwise({
redirectTo: '/'
});
});