I have an event on $rootScope in controllerOne:
$rootScope.$on('eventName', function(event, args) {
invoke function A;
});
and controllerTwo, I emit the event:
$scope.$emit('eventName', args);
if I first enter the controllerOne, when I emit the event, function A run only one time;and when I enter controllerOne second times, I emit the event and then function A run more than one time, maybe two or three times.
How can I prevent bind event on $rootScope repeatedly