Let's say I want a directive where it takes what the user types in an input and turns it to lowercase.

So I come up with a directive like this (and in this Plunker <http://plnkr.co/edit/jnE3s8MRr1tFCX0WVYel?p=preview>):

```
app.directive('lowerCaseInput', function() {
  return {
    restrict: 'E',
    template:'<input ng-model="vm.input" />',
    scope: {},
    require: ['ngModel', 'lowerCaseInput'],
    controller:function() {},
    link: function(scope, el, attrs, ctrls) {
      var ngModel = ctrls[0], vm = ctrls[1];
      ngModel.$render = render;

        // view-> model
      ngModel.$parsers.push(function(value) {
        return toLowerCase(value);
      });

        // model->view
      ngModel.$formatters.push(function(value) {
        return value;
      });

      function render() {
        vm.input = ngModel.$viewValue;
      }

      // view -> model && model-> view
      function toLowerCase(value) {
        return value && value.toLowerCase();
      }

      scope.$watch('vm.input', function(newVal, oldVal) {
        if(newVal !== oldVal)
          ngModel.$setViewValue(newVal);
        });
    },
    controllerAs: 'vm'
  }
})

```

However, as you can see in the demo, the model value doesn't get reflected (turned to all lowercase) on the initial pass because the setViewValue is never triggered. Is there a general approach I should be following for situations like this where I do want the directive to change the model based on some rules?

Furthermore, I'd like to avoid turning the control to dirty until the user has actually interacted with it, so even if I did get it to call $setViewValue and caused a $parsers pipeline, I'd want it to realize that the user didn't actually interact with it (thus keeping it $pristine).

Is this possible? If so, what are some best practices concerning it (like is it ok to call $setViewValue from $format -- overwrite ngModel directly? Etc...