title: Comparing numbers in text fields with AngularJS
body: <p>Controller:</p>
  
  <pre><code>angular.module('myApp', [])
      .controller('MainCtrl', function($scope) {
          $scope.d = { v1: '100', v2: '20' };
      });
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>&lt;div ng-app="myApp"&gt;
    &lt;div ng-controller="MainCtrl"&gt;
        1: &lt;input type="text" ng-model="d.v1" /&gt;
        2: &lt;input type="text" ng-model="d.v2" /&gt;
        &lt;h4&gt;{{d.v1}} &amp;lt; {{d.v2}} = {{d.v1 &lt; d.v2}}&lt;/h4&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/GDfxd/292/" rel="nofollow noreferrer">http://jsfiddle.net/GDfxd/292/</a></p>
  
  <p>This example incorrectly shows that 100 is less than 20. Any advice how to    make this comparison numeric ?</p>