I think the only way to do what you want with your service is by injecting rootScope and using $emit, since we're trying to capture a "logout" event and tell our other controllers about it.
Reacting to the specific event would likely waste less resources than pulling out the $watch or $watchCollection sledgehammer.
Comments
I think the only way to do what you want with your service is by injecting rootScope and using $emit, since we're trying to capture a "logout" event and tell our other controllers about it.
Reacting to the specific event would likely waste less resources than pulling out the $watch or $watchCollection sledgehammer.