I have a popup controller:
@PopupController = ["$scope", ($scope) ->
$scope.isActive = false
$scope.open = ->
$scope.isActive = true
]
And teachers controller:
@TeachersController = ["$scope", "Teacher", ($scope, Teacher) ->
$scope.teachers = Teacher.query()
$scope.showTeacher = ->
# somehow call PopupController.open()
]
How to call PopupController.open() from TeachersController?
Or maybe I'm doing it wrong and Angular has some better ways to implement it?
ng-controllerattr. How can I bind the service in the same way?