title: AngularJS reloading ngTable from ng-change event
body: <p>I am populating ngTable using the following which works fine:</p>
  
  <pre><code>      $scope.data = ClientService.query(
          {
              state: $scope.currentStateId,
              parentId: $scope.parentId
          });
  
      $scope.data.$promise.then(function (data) {
          $scope.tableParams = new ngTableParams(
              {
                  page: 1,                        // show first page
                  count: $scope.pageCount,        // count per page
                  sorting: { Name: 'asc' },
                  filter: { Name: ''}
              },
              {
                  total: data.length,
                  getData: function ($defer, params) {
                      var orderedData = params.filter() ? $filter('filter')(data, params.filter()) : data;
                      orderedData = params.sorting() ? $filter('orderBy')(orderedData, params.orderBy()) : orderedData;
                      params.total(orderedData.length); // set total for recalc pagination
  
                      $scope.accounts = orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count());
                      $defer.resolve($scope.accounts);
                  }
              });
      });
  </code></pre>
  
  <p>I now wish to update the ngTable from an ng-change event which sets a new $scope.currentStateId as follows:</p>
  
  <pre><code> $scope.stateChange = function () {
          //$state.go('root.account.clients.list', { state: $scope.currentStateId, parentId : $scope.parentId }, { reload : true })
          //var sel = $scope.currentStateId;
          $scope.data = ClientService.query(
              {
                  state: $scope.currentStateId,
                  parentId: $scope.parentId
              });
         $scope.tableParams.reload();
      };
  </code></pre>
  
  <p>The ClientService.query hits the server with the correct parameters and returns the correct data but the ngTable is not updated.</p>
  
  <p>Can someone please help.</p>