Why is Global State so Evil?
Before we start this, let me say I'm well aware of the concepts of Abstraction and Dependency Injection. I don't need…
Most of the time you can avoid using $rootScope by using a service instead. One scenario remains however, which is using Angular’s event system. If you want to trigger an event in a way which makes the event propagate through the entire DOM tree (not just up or down from the current $scope), you can use $rootScope.$broadcast(). This is in fact similar to binding DOM events to the body element, window or document, which again is very similar to using globals. Event propagation in the DOM is a tricky thing which $broadcast makes somewhat more predictable, but not by much. Again you can avoid this by implementing a service which follows the Publish/Subscribe pattern.