title: Passing ngModel to directive in controllerAs component
body: <p>From a directive using the controllerAs declaration, I want to pass a scope variable to a nested directive, that is to be used within. I want any changes from "inside" to be reflected on the outside, and vice versa.</p>
  
  <p>Grabbing the variable through an isolated scope is not an option, as the controllerAs directive is already asking for an isolated scope. <a href="http://plnkr.co/edit/YwTd83PwH30hotPAUD2z" rel="nofollow">See example here</a></p>
  
  <p>I have come up with this, in the inner directive:</p>
  
  <pre><code>link: function($scope, el, attrs, ngModel) {
      $scope.ngModel = {};
      $scope.modelValue = ngModel.$modelValue;
  
      $scope.$watch(function () {
          return ngModel.$modelValue;
      }, function(newValue) {
          $scope.ngModel = newValue;
      });
  
      $scope.$watch(function () {
          return $scope.ngModel;
      }, function(newValue) {
          ngModel.$setViewValue(newValue);
      }, true);
  }
  </code></pre>
  
  <p>- as seen in the <a href="http://plnkr.co/edit/llKQrx0bxiFsmMGYE3In" rel="nofollow">following example</a>, but it seems very hacky. How is this done best?</p>