title: Event emitting and listening on directive scopes
body: <p>I have this snippet of code here, which is part of a directive.</p>
  <pre class="lang-js prettyprint-override"><code>return {
        restrict: &quot;E&quot;,
        transclude: true,
        templateUrl: &quot;ui/components/captionSection.html&quot;,
        scope: {
          captions: &quot;&lt;?&quot;,
          vidDuration: &quot;&lt;?&quot;,
        },
        link: function (scope, element, attributes) {
          
          
          $rootScope.$on(&quot;youtube.player.playing&quot;, function ($event, player) {
            
          });
  
          scope.$on(&quot;youtube.player.playing&quot;, function ($event, player) {
           
          });
         
  
          scope.$on(&quot;$destroy&quot;, function ($event) {
            console.log($event);
            $timeout.cancel(timeoutPromise);
            element.remove();
          });
        },
      };
  </code></pre>
  <p>The event it's listening to are triggered by <a href="https://github.com/brandly/angular-youtube-embed" rel="nofollow noreferrer">this</a> package, more specifically this function.</p>
  <pre class="lang-js prettyprint-override"><code>function applyBroadcast () {
                  var args = Array.prototype.slice.call(arguments);
                  scope.$apply(function () {
                      scope.$emit.apply(scope, args);
                  });
              }
  </code></pre>
  <p>My question is why am I able to catch the event with only the $rootScope and not with the directive scope. I can catch the event on a controller with $scope, isn't the behaviour the same?</p>
  <p>Thanks in advance</p>