title: Accessing parent scope in directive when using controllerAs
body: <p>I currently have a directive that's using properties from the parent controller's scope:</p>
  
  <pre><code>.controller('MainCtrl', function($scope) {
    $scope.name = 'My Name';
  })
  
  .directive('myDirective', function() {
    return {
      scope: true,
      controller: function($scope) {
        console.log($scope.name); // logs 'My Name'
      }
    };
  })
  </code></pre>
  
  <p>Now I'm moving over to <code>controllerAs</code> syntax in my controllers, but I don't know how to get a reference to the controller object in my directive's controller.</p>
  
  <pre><code>.controller('MainCtrl', function() {
    var vm = this;
    vm.name = 'My Name';
  })
  
  .directive('myDirective', function() {
    return {
      scope: true,
      controller: function($scope) {
        console.log(vm.name); // logs 'Undefined'
      }
    };
  })
  </code></pre>
  
  <p>Here's <a href="http://plnkr.co/edit/kkh3MzuGdNqaLSGkVv3n?p=preview" rel="noreferrer">a plunkr</a> illustrating the issue.</p>
  
  <p>I also found <a href="http://www.bennadel.com/blog/2896-accessing-the-view-model-inside-the-link-function-when-using-controller-as-in-angularjs.htm" rel="noreferrer">this article</a> that's trying to explain something similar, but in this case he's just reusing the exact same controller.</p>