title: Angularjs int filter not sorting properly within smart-table
body: <p>I am using smart-table to present my data (which is loaded via json files via %http.get) on a view within my app.</p>
  
  <p>within the controller for the view I have created a filter as the returned data from the json has numbers in it which are returned as data type string.  The filter attempts to return the numbers as an INT data type so that the sort function of smart-table will order them correctly.  </p>
  
  <p>However no matter what I try the smart-table sort is still sorting the values as String data type.</p>
  
  <p>My view which is called Interfaces.html:</p>
  
  <pre><code>&lt;div ng-controller="interfaceController"&gt;
      &lt;div class="container"&gt;
          &lt;table st-table="displayedCollection" st-safe-src="rowCollection" class="table table-striped" ng-show="displayedCollection"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th st-sort="Name"&gt;Interface&lt;/th&gt;
                      &lt;th st-sort="Disabled"&gt;Disabled&lt;/th&gt;
                      &lt;th st-sort="Online"&gt;Online&lt;/th&gt;
                      &lt;th st-sort="Failed"&gt;Failed&lt;/th&gt;
                      &lt;th st-sort="Error"&gt;Error&lt;/th&gt;
                      &lt;th st-sort="Overdue"&gt;Overdue&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;th colspan="4"&gt;&lt;input st-search="" class="form-control" placeholder="global search...." type="text"/&gt;&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr ng-repeat="row in displayedCollection"&gt;
                      &lt;td&gt;{{row.Name}}&lt;/td&gt;
                      &lt;td&gt;{{row.Disabled | convertInt | number}}&lt;/td&gt;
                      &lt;td&gt;{{row.Online}}&lt;/td&gt;
                      &lt;td&gt;{{row.Failed}}&lt;/td&gt;
                      &lt;td&gt;{{row.Error}}&lt;/td&gt;
                      &lt;td&gt;{{row.Overdue}}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My controller which is called interfaceController.js</p>
  
  <pre><code>app.controller('interfaceController',['$scope','$http', function($scope,$http){
  
      $http.get('app/data/InterfacesAuto.json').success(function(data,status,headers,config){
          $scope.rowCollection = data;
  
          $scope.displayedCollection = [].concat($scope.rowCollection);
      });
  
  }]);
  
  // Filter takes a value from the table and returns it as an INT
  app.filter('convertInt',function(){
      return function (input) {
          this.parseInt = parseInt;
          return (parseInt(input,10));
      };
  });
  </code></pre>
  
  <p>The json which I am loading</p>
  
  <pre><code>[
  {"Name":"First","Disabled":"2","Online":"5","Failed":"1","Error":"0","Overdue":"2"},
  {"Name":"Second","Disabled":"163","Online":"426","Failed":"7","Error":"0","Overdue":"195"},
  {"Name":"Third","Disabled":"0","Online":"1","Failed":"0","Error":"0","Overdue":"0"}
  ]
  </code></pre>
  
  <p>Im very new to angularjs and web design so thank you in advance for your help.</p>
  
  <p>Cheers</p>