title: ngtable paging and sorting
body: <p>I have the following problem using ngtable. When I make a http get request and I get data, everything works fine with ngtable, but it gives me no the possibility to order. But if I make a new http get request (without reload page). Then show me the table with the new data, shows me correctly the amount of data of the new request, but does not show paging and not the option to select the number of rows per page. I tryed reload table params, without result.</p>
  
  <p>My code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $scope.httpget = function(uri)
      {
          $scope.data=[];
          $http.get(uri).then(
              function(result){
                $scope.data = result.data;
                $scope.tableParams = new ngTableParams({
                          page: 1,
                          count: 10,
                          filter: {
                              message: ''
                          },
                          sorting: {
                              timestamp: 'asc'
                          }
                      },
                      {
                          getData: function($defer, params) {
                              var orderedData = params.sorting() ?
                                  $filter('orderBy')($scope.data, params.orderBy()) :
                                  $scope.data;
  
                              params.total(orderedData.length);
                              $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
                          }
                      });
              }
          );
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table ng-table='tableParams'&gt;
      &lt;tr ng-repeat='d in $data | filter:search'&gt;
           &lt;td data-title="'Collected Timestamp'" sortable="'timestamp'"&gt; {{d.timestamp}} &lt;/td&gt;
           &lt;td data-title="'Tag Name'", sortable="'tag_name'"&gt; {{d.tag_name}} &lt;/td&gt;
           &lt;td data-title="'Value'", sortable="'value'"&gt; {{d.value}} &lt;/td&gt;
      &lt;tr&gt;
  &lt;/table&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>Result ok after first http get
  <a href="https://i.stack.imgur.com/P7hiw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P7hiw.png" alt="enter image description here"></a></p>
  
  <p>Result bad after second http get (no paging)</p>
  
  <p><a href="https://i.stack.imgur.com/rwnCL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rwnCL.png" alt="enter image description here"></a></p>