title: AngularJS - restore the original rows order with ng-table
body: <p>I've enabled sorting in ng-table with $scope.tableParams.sorting() method. Mouse clicks on the column headers will switch between ascending and descending order, but I would like to switch it between ascending, descending and the original (unsorted) row order. Any hints how to achieve this?</p>
  
  <p>I tried something like that:</p>
  
  <pre><code>if ($scope.tableParams.isSortBy(colName, 'asc')) {
         $scope.tableParams.sorting({colName: 'desc'});
   }
  else if($scope.tableParams.isSortBy(colName, 'desc')) {
        $scope.tableParams.sorting({colName: ''});
   }
  else{
        $scope.tableParams.sorting({colName: 'asc'});
   }
  </code></pre>
  
  <p>tnx.</p>