title: call $emit event from angular to angularJS (publish-subscribe pattern)
body: <p>I have a hybrid angular application tha uses both angularJS and angular 5.</p>
  
  <p>I'm migrating a controller from angularJS to angular 5. This controller (let's call controller1) have the following code:</p>
  
  <pre><code>$rootScope.$emit('goToHomeEvent', 'Navigate to HomePage');
  </code></pre>
  
  <p>Then, I have another controller (let's call controller2) that subscribes the <code>goToHomeEvent</code>:</p>
  
  <pre><code> $rootScope.$on('goToHomeEvent', function (event, data) {
              //Do some stuff
          });
  </code></pre>
  
  <p>My goal is to only migrate the controller1 to angular 5, mantaining the code of controller2 has it is, maintaining the ability to subscribe the <code>goToHomeEvent</code> event.</p>
  
  <p>Any suggestions?</p>