I have code in homepage controller:
$scope.$on('showInfo', function(){
console.log('ok');
});
And anywhere i call:
$rootScope.$broadCast('showInfo');
It's work well, but have a case following:
I go to other (single page, don't reload page)
Comback '
homepage', then$scope.$onwill be called twice ( and if i go to other page 'N' times,$scope.$onwill be called 'N' times)
I can't know reasons
:( it's very bad
Thanks for help me.