title: Angular - default value for model
body: <p>Say I have some html as follows:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt; angular etc. &lt;/head&gt;
  &lt;body ng-app&gt;
  &lt;div ng-controller="MyCtrl"&gt; 
        &lt;input ng-model="weight" type="number" min="{{minWeight}}" max="{{maxWeight}}"&gt;
        &lt;p&gt;{{weight}}&lt;/p&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and the following controller:</p>
  
  <pre><code>function MyCtrl($scope){
      $scope.weight = 200;
      $scope.minWeight = 100.0;
      $scope.maxWeight = 300.0;
  
  
  } 
  </code></pre>
  
  <p>The "min" and "max" will show the user their input is bad, and if I hard code them to say, 100 and 300, it will make sure the value is never bound to the model at all (why isn't the behavior the same??). What I'd like to do is only actually change the "weight" if the value meets the input requirements. Any thoughts?</p>