title: Filter does not show as I expected
body: <p>I made a table that displays values from an array, to which I added a filter. The table is paginated with a maximum of 5 records per page.</p>
  
  <p>The problem occurs when I apply the filter. For example, if you do a search for the term "ora" will have three records, one on each page.</p>
  
  <p>How do these results to display together (on one page, or how many pages it needs, but not dissipated) and when I remove the filter to display it normal (in all pages)?</p>
  
  <p>The live code is available here: <a href="https://plnkr.co/edit/QIcmQUqABDJcV3H6vqRo?p=preview" rel="nofollow">https://plnkr.co/edit/QIcmQUqABDJcV3H6vqRo?p=preview</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body ng-app="salariesApp" ng-controller="mainCtrl"&gt;
      &lt;table class="table"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th ng-click="sortBy(id)"&gt;Nr. crt.&lt;/th&gt;
                  &lt;th ng-click="sortBy(an)"&gt;Anul&lt;/th&gt;
                  &lt;th ng-click="sortBy('den')"&gt;Denumirea institutiei/companiei&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td class="tableSearch"&gt;&lt;/td&gt;
                  &lt;td class="tableSearch"&gt;&lt;input class="form-control" type="text" id="inputYear" ng-model="searchSal.an" ng-value={{crrYear}} /&gt;&lt;/td&gt;
                  &lt;td class="tableSearch"&gt;&lt;input class="form-control" type="text" id="inputName" ng-model="searchSal.den" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr ng-repeat="rows in showSal | filter: searchSal | orderBy: sortProperty: !reverse | filter : paginate track by $index"&gt;
                  &lt;td class="spa-col-md-1"&gt;{{rows.id}}&lt;/td&gt;
                  &lt;td class="spa-col-md-2"&gt;{{rows.an}}&lt;/td&gt;
                  &lt;td class="col-md-5"&gt;{{rows.den}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  
      &lt;pagination total-items="totalItems" ng-model="currentPage" max-size="5" boundary-links="true"
          items-per-page="numPerPage" class="pagination-sm"&gt;
      &lt;/pagination&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var app = angular.module("salariesApp", ['ui.bootstrap']);
  
  app.constant("appConst", {
      pagesLimit:             5,
      crrYear:                    2016
  });
  
  app.controller('mainCtrl', ['$scope', 'appConst', function($scope, appConst) {  
      $scope.crrYear = appConst.crrYear;
  
      $scope.pageNum = {
          linkBtnClass: 'linkBtnClass cursor-pointer'
      };
  
      $scope.showSal = [
          { id: '1', an: '2016', den: 'Oracle Romania' },
          { id: '2', an: '2016', den: 'Microsoft' },
          { id: '3', an: '2016', den: 'Computer Generated Solutions - CGS Europe' },
          { id: '4', an: '2016', den: 'IBM' },
          { id: '5', an: '2016', den: 'Luxoft' },
          { id: '6', an: '2016', den: 'Oracle Romania' },
          { id: '7', an: '2016', den: 'Luxoft' },
          { id: '8', an: '2016', den: 'Computer Generated Solutions - CGS Europe' },
          { id: '9', an: '2016', den: 'IBM' },
          { id: '10', an: '2016', den: 'Luxoft' },
          { id: '11', an: '2016', den: 'Oracle Romania' },
          { id: '12', an: '2016', den: 'Microsoft' },
          { id: '13', an: '2016', den: 'IBM' },
          { id: '14', an: '2016', den: 'Luxoft' }
      ];
  
      $scope.searchSal = '';
  
      $scope.sortProperty = $scope.showSal.id;
      $scope.reverse = true;
      $scope.sortBy = function (sortProperty) {
          $scope.reverse = ($scope.sortProperty === sortProperty) ? !$scope.reverse : false;
          $scope.sortProperty = sortProperty;
      };
  
  
  
      // PAGINATION:
      $scope.totalItems = $scope.showSal.length;
      $scope.currentPage = 1;
      $scope.numPerPage = 5;
  
      $scope.paginate = function(value) {
          var begin, end, index;
          begin = ($scope.currentPage - 1) * $scope.numPerPage;
          end = begin + $scope.numPerPage;
          index = $scope.showSal.indexOf(value);
          return (begin &lt;= index &amp;&amp; index &lt; end);
      };
  
  
      $scope.getOptionsClass = function (index) {
          if (index &gt; 0) {
              return 'thumbnail nav-option-r';
          } else {
              return 'thumbnail nav-option-l';
          }
      };
  }]);
  </code></pre>