When broadcasting from my rootScope, if there are no event listeners listening for my event, I'd like to run my own function in the rootScope. Is this possible?
I'm not near a computer where I can quickly validate, but i think you can use:
$rootScope.$$listenerCount[eventName] === 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With