title: AngularJS orderby integer field not working properly
body: <p>I just took the simplest demo from <a href="http://docs.angularjs.org/api/ng.filter:orderBy">http://docs.angularjs.org/api/ng.filter:orderBy</a>  and just change the value of age to have different number of digit. It stop working as it expected. Its ordering like "string" not as "integer" value. How should i change it so that it order by age like integer value?</p>
  
  <p>Plunkr demo is here
  <a href="http://plnkr.co/edit/pzgiIYrki7jUZdVaTMt9?p=preview">http://plnkr.co/edit/pzgiIYrki7jUZdVaTMt9?p=preview</a></p>
  
  <p>Codes are:</p>
  
  <pre><code>function Ctrl($scope) {
    $scope.friends =
        [{name:'John', phone:'555-1212', age:'2352345'},
         {name:'Mary', phone:'555-9876', age:'4235243'},
         {name:'Mike', phone:'555-4321', age:'241'},
         {name:'Adam', phone:'555-5678', age:'34325'},
         {name:'Julie', phone:'555-8765', age:'1234'}]
    $scope.predicate = '-age';
  }
  
  
  &lt;!doctype html&gt;
  &lt;html ng-app="App"&gt;
    &lt;head&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="script.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
    &lt;body&gt;
  
  &lt;div ng-controller="Ctrl"&gt;
    &lt;pre&gt;Sorting predicate = {{predicate}}; reverse = {{reverse}}&lt;/pre&gt;
    &lt;hr/&gt;
    [ &lt;a href="" ng-click="predicate=''"&gt;unsorted&lt;/a&gt; ]
    &lt;table class="friend"&gt;
      &lt;tr&gt;
        &lt;th&gt;&lt;a href="" ng-click="predicate = 'name'; reverse=false"&gt;Name&lt;/a&gt;
            (&lt;a href="" ng-click="predicate = '-name'; reverse=false"&gt;^&lt;/a&gt;)&lt;/th&gt;
        &lt;th&gt;&lt;a href="" ng-click="predicate = 'phone'; reverse=!reverse"&gt;Phone Number&lt;/a&gt;&lt;/th&gt;
        &lt;th&gt;&lt;a href="" ng-click="predicate = 'age'; reverse=!reverse"&gt;Age&lt;/a&gt;&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr ng-repeat="friend in friends | orderBy:predicate:reverse"&gt;
        &lt;td&gt;{{friend.name}}&lt;/td&gt;
        &lt;td&gt;{{friend.phone}}&lt;/td&gt;
        &lt;td&gt;{{friend.age}}&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>