title: Angularjs orderBy: how to call default comparator from custom sort function
body: <p>I have a custom sort function to convert strings to numbers for one column in a grid. The other columns are comprised of strings or date values. I have a custom sort function which checks for the number column and performs the conversion, but for the other values I want the default comparator's behavior. How do I achieve this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.sort = function (keyname) {
    $scope.sortKey = keyname;
    $scope.reverse = !$scope.reverse;
  };
  
  
  $scope.sortSubGrid = function (a, b) {
    if ($scope.sortKey === 'caseNumber') {
      return = parseInt(b.value) -parseInt(a.value);
    }
    else {
      return = a.value &gt; b.value;
    }
  };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;tr dir-paginate="agreement in agreements|orderBy:sortKey:reverse:sortSubGrid" ...&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The second half of the sortSubGrid function is intended to sort the non-numeric columns, but isn't achieving the results I expect, which is simply the results the default comparator provides. How do I get the default behavior for this second clause?</p>