In one controller of my Angular 1.4.7 app I fire an event like so:
$rootScope.$broadcast('event:auth:login-finished');
then in another controller, I attempt to listen to this event with
$scope.$on('event:auth:login-finished', function () {
console.debug('ROOT AUTH HANDLER CALLED');
});
For some reason, the handler is never called, even though the event is definitely being fired, am I doing something wrong?
Update
I've also tried listening to the root scope
$rootScope.$on('event:auth:login-finished', function () {
console.debug('ROOT AUTH HANDLER CALLED');
});
But this doesn't get called either