title: Angular Directive: ngModelController custom parser not called
body: <p>I know that I can use formatters and parsers in my directive to transform my data like this:</p>
  
  <pre><code>  //format text going to user (model to view)
    ngModel.$formatters.push(function(value) {
      return value.toUpperCase();
    });
  
    //format text from the user (view to model)
    ngModel.$parsers.push(function(value) {
      return value.toLowerCase();
    });
  </code></pre>
  
  <p>Full example here <a href="http://plnkr.co/edit/i59xSdVPMxRkgERhj8RE?p=preview" rel="nofollow">http://plnkr.co/edit/i59xSdVPMxRkgERhj8RE?p=preview</a></p>
  
  <p>But I can't get this to work when I am using a template inside my directive. My custom parser isn't called:</p>
  
  <pre><code>var app = angular.module('plunker', []);
  
  app.controller('MainCtrl', function($scope) {
    $scope.data = { name: ''};
  });
  app.directive('changecase', function () {
    return {
      restrict: 'E',
      require: 'ngModel',
      scope: { model: '=ngModel' },
      template: '&lt;input type="text" ng-model="model"&gt; {{ model }}',
      link: function (scope, element, attrs, ctrl) {
  
        //format text going to user (model to view)
        ctrl.$formatters.push(function(value) {
          return value.toUpperCase();
        });
  
        //format text from the user (view to model)
        ctrl.$parsers.push(function(value) {
          return value.toLowerCase();
        });
      }
    }
  });
  </code></pre>
  
  <p>With this html:</p>
  
  <pre><code>  &lt;body ng-controller="MainCtrl"&gt;
      &lt;changecase ng-model="data.name"&gt;&lt;/changecase&gt;
      &lt;pre&gt;model is: {{data.name}}&lt;/pre&gt;
    &lt;/body&gt;
  </code></pre>
  
  <p>I'm guessing that this is either a scope or timing issue, but I can't work it out. Can anyone see what I'm doing wrong?</p>
  
  <p>Feel free to mess around with the Plunker here: <a href="http://plnkr.co/edit/FZ4UnW8wIhIwRV2jVvfB?p=preview" rel="nofollow">http://plnkr.co/edit/FZ4UnW8wIhIwRV2jVvfB?p=preview</a></p>