我有一个弹出控制器:
@PopupController = ["$scope", ($scope) ->
$scope.isActive = false
$scope.open = ->
$scope.isActive = true
]
和教师控制器:
@TeachersController = ["$scope", "Teacher", ($scope, Teacher) ->
$scope.teachers = Teacher.query()
$scope.showTeacher = ->
# somehow call PopupController.open()
]
如何拨打PopupController.open()
电话TeachersController
?
或者也许我做错了,Angular 有一些更好的方法来实现它?