I'm trying to make one of my first AngularJS apps, and I have problems trying to use multiple controllers. What I have is :
.when('/tickets',
{
controller: 'TicketsController',
templateUrl: 'views/Tickets.html'
})
And I want to do something like this
.when('/tickets',
{
//i know this dont work
controller: ['TicketsController', 'OtherEntityController'],
templateUrl: 'views/Tickets.html'
})
I've tried ng-controller
but once it's there controllers can't know stuff about each other.
I thought using a directive but is too much just for a few options:
I could put my OtherEntityController
inside TicketsController
but thats not a good way to organize my code.