title: angular rootscope broadcast from a service
body: <p>I heard its a bad practice to use rootscope $on from a controller, because when a controller is destroyed, the event listener is not. If I use it from a service and inject it to the controller, like below, will it prevent memory leaks?</p>
  
  <pre><code>.service("hiEventService",function($rootScope) {
      this.broadcast = function() {$rootScope.$broadcast("hi")}
      this.listen = function(callback) {$rootScope.$on("hi",callback)}
  })
  </code></pre>