title: Why can't the $rootScope be accessed in the template of a directive with isolate scope?
body: <p>With isolate scope the template of the directive does not seem to be able to access the controller ('Ctrl') $rootScope variable which, however, does appear in the controller of the directive. I understand why the controller ('Ctrl') $scope variable isn't visible in the isolate scope.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-app="app"&gt;
      &lt;div ng-controller="Ctrl"&gt;
          &lt;my-template&gt;&lt;/my-template&gt;
      &lt;/div&gt;
  
      &lt;script type="text/ng-template" id="my-template.html"&gt;
          &lt;label ng-click="test(blah)"&gt;Click&lt;/label&gt;
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>angular.module('app', [])
      .controller('Ctrl', function Ctrl1($scope,  $rootScope) {
          $rootScope.blah = 'Hello';
          $scope.yah = 'World'
      })
      .directive('myTemplate', function() {
          return {
              restrict: 'E',
              templateUrl: 'my-template.html',
              scope: {},
              controller: ["$scope", "$rootScope", function($scope, $rootScope) {
                  console.log($rootScope.blah);
                  console.log($scope.yah);,
  
                  $scope.test = function(arg) {
                      console.log(arg);
                  }
              }]
          };
      });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/mg74b/18/">JSFiddle</a></p>
  
  <p>The variable is accessed with no isolate scope - as can be seen by commenting the isolate scope line:</p>
  
  <pre><code>        // scope: {},
  </code></pre>