title: How to change the total item count when filtering with some condition in Angular Bootstrap pagination?
body: <p>I have a table of users having different status.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;select class="form-control" id="sel1" data-ng-model="status" required&gt;
      &lt;option value=""&gt;Status&lt;/option&gt;
      &lt;option value="Open"&gt;Open&lt;/option&gt;
      &lt;option value="In-Progress"&gt;In-Progress&lt;/option&gt;
      &lt;option value="Rejected"&gt;Rejected&lt;/option&gt;
      &lt;option value="Verified"&gt;Verified&lt;/option&gt;
      &lt;option value="Closed"&gt;Closed&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;tbody&gt;
       &lt;tr data-ng-repeat="userDetails in (data | filter:status:status.status).slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage))"&gt;   
           &lt;td&gt; {{ userDetails.subDate | date : 'MM-dd-yyyy' }} &lt;/td&gt;
           &lt;td&gt; {{ userDetails.fullName }} &lt;/td&gt;
           &lt;td&gt; {{ userDetails.serviceType.serviceName }} &lt;/td&gt;
           &lt;td&gt; {{ userDetails.status.status }} &lt;/td&gt;
       &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$http.get('getAlldetails').success(function(response)
              {
                  $scope.data = response;
                  $scope.totalItems = response.length;
                  $scope.viewby = 10;
                  $scope.currentPage = 1;
                  $scope.itemsPerPage = $scope.viewby;
                  $scope.maxSize = 5; 
  
                  $scope.setPage = function (pageNo) {
                      $scope.currentPage = pageNo;
                  };
  
                  $scope.setItemsPerPage = function(num) {
                      $scope.itemsPerPage = num;
                      $scope.currentPage = 1; 
                      }
  
                  });
  </code></pre>
  
  <p>If there are 45 users, Pagination is happening properly. But If I try to view the list according to the status, it will display accordingly but total items count would be still 45 and there would be unnecessary blank page numbers even though it is not required. Any solution? </p>