I have event listeners activated by:
var unregisterSubscription = $rootScope.$on(event, handler);
The event is activated in component and/or directive. I want the listener to listen when the user uses the scope of the listener, otherwise not.
now my question is where i activate the unregisterSubscription method?