title: Using ControllerAs with a Directive
body: <p>I'm trying to follow John Papa's angularJS style guide <a href="https://github.com/johnpapa/angular-styleguide" rel="noreferrer">here</a> and have started switching my directives to using controllerAs.  However, this is not working.  My template cannot seem to access anything assigned to vm.  See this very simple plnkr example that exhibits the behavior.</p>
  
  <p><a href="http://plnkr.co/edit/bVl1TcxlZLZ7oPCbk8sk?p=preview" rel="noreferrer">http://plnkr.co/edit/bVl1TcxlZLZ7oPCbk8sk?p=preview</a></p>
  
  <pre><code>angular
      .module('app', []);
  
  angular
      .module('app')
      .directive('test', test);
  
  function test() {
      return {
          restrict: 'E',
          template: '&lt;button ng-click="click"&gt;{{text}}&lt;/button&gt;',
          controller: testCtrl,
          controllerAs: 'vm'
      }
  }
  
  angular
      .module('app')
      .controller('testCtrl', testCtrl);
  
  function testCtrl() {
    var vm = this;
    vm.text = "TEST";
  }
  </code></pre>