title: How to access the $ngModelController from inside the Controller without a Form and without a Directive
body: <p>Maybe it's a rookie mistake, but I can't seem to access the <code>$scope.model</code>'s <code>$ngModelController</code> so I can grab the <code>$viewValue</code> from it. </p>
  
  <p>I have an input without a form (im using ui-mask directive):</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" ng-model="inicio" name="inicio" ui-mask="99/99/9999"&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// inside my controller
  $scope.inicio = dateFilter((new Date).getTime(), 'dd/MM/yyyy');
  </code></pre>
  
  <p>ui-mask set the $modelValue a different value than $viewValue, making it hard to send formatted data to the server. When the <code>$scope.inicio</code> model changes, the value is a date without slashes, like <code>01012014</code>. So I need to be able to get the controller for that input, but without having to wrap it in a form, and have to use <code>$scope.myForm.inicio.$viewValue</code>. It MUST be possible...</p>
  
  <p>Things I know I can do, but seems hacky, there must be a simpler way:</p>
  
  <ul>
  <li>Put the element inside a form and access it through <code>$scope.myForm.input.$viewValue</code></li>
  <li>Get the element data using jQuery <code>$('input[name="inicio"]').data('$ngModelController');</code></li>
  <li>Get the element using <code>angular.element('input[name="inicio"]').controller('ngModel');</code></li>
  <li>Create a directive, put it in the input, and update my scope model with it</li>
  </ul>
  
  <pre class="lang-js prettyprint-override"><code>app.directive('viewValue', function(){
    return {
      priority: 10,
      require: 'ngModel',
      link: function(scope, element, attrs, controller){
        scope.$watch(attrs.viewValue, function(newValue, oldValue){
          if (newValue !== oldValue){
            scope[attrs.viewValue] = controller.$viewValue;
          }
        });
      }
    }
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" ui-mask="99/99/9999" ng-model="inicio" view-value="inicio"&gt;
  </code></pre>