title: Angularjs pagination in ng-repeat
body: <p>In my controller I have following code that gets data from the database.</p>
  
  <pre><code> $scope.noOfPages = 0;
      $scope.currentPage = 1;
      $scope.maxSize = 5;
   $scope.tickets = TicRepository.getTics.query({ id: $routeParams.t_id }, function (data) {
          $scope.tickets = data.items;
          $scope.noOfPages = data.totalPages,
          $scope.currentPage = data.pages;
      });
  </code></pre>
  
  <p>And in my html I have </p>
  
  <pre><code> &lt;div&gt;
      div&gt;
          {{noOfPages}} &amp;nbsp; {{currentPage}} &amp;nbsp; {{maxSize}}
          &lt;pagination num-pages="noOfPages" current-page="currentPage"&gt;&lt;/pagination&gt;
      &lt;/div&gt;
       &lt;div ng-repeat="tics in tickets " &gt;
            ................
       &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I get the data fine but pagination is not working. In pagination buttons it just shows 1 page and lists all items. Please let me know how to fix this problem.
  Thanks </p>