title: AngularJs: round scope variable attached to input
body: <p>I'm trying to round a $scope-variable attached to an input-form - but just in the view!</p>
  
  <p>Normally, if you want to round a number in your view you do it like this:</p>
  
  <pre><code>{{ price | number: 2 }}
  </code></pre>
  
  <p>What if I want to round the variable but need the unrounded value to insert it into the database? If I use a filter it wont work this way. </p>
  
  <p>I use a function to increase/decrease the price by percentage so is there a way to just round the scope, attached to an input-form, in the view like this:</p>
  
  <pre><code>&lt;input type="text" ng-model="price|number: 2"/&gt;     
  </code></pre>