title: how to get total number of records retrieved with pagination on the current page using angular?
body: <p>in my code currently i am showing 2 records per page and their are total 10 pages showing data , i want that it should display total items like this in the header :
  1-2 of 10 means record number 1,2 out of 10 record and when i click next button it should show me another record like 3-4 of 10 . i am not getting any clue how to do this , nothing of this kind is given on the angular tutorials , kindly help me out.</p>
  
  <p>this is my code for pagination in html:</p>
  
  <pre><code> &lt;pagination page="currentPage" max-size="maxSize" total-items="totalItems"
                              items-per-page="entryLimit" boundary-links="true" rotate="false" style="cursor:pointer"&gt;
                          &lt;/pagination&gt;
  </code></pre>
  
  <p>here is my controller logic:</p>
  
  <pre><code>                          $scope.currentPage = 1;
                            $scope.maxSize = 2;
                            $scope.totalLeadItems = $scope.finalLeadData.dataval;
                            $scope.totalItems = $scope.finalLeadData.dataval.length;
                            $scope.entryLimit = 2; // items per page
                            $scope.noOfPages = Math.ceil($scope.totalItems / $scope.entryLimit);
  
                           $scope.search = function (item){
                            //console.log(item.LEAD_NM);
                            return !! ((angular.lowercase(item.LEAD_NM).indexOf($scope.search.LEAD || '') !== -1 || angular.lowercase(item.LEAD_MBL).indexOf($scope.search.LEAD || '') !== -1));
  
                              };
  
  
                            //$watch search to update pagination
                            $scope.$watch('search.LEAD', function (newVal) {
                                $scope.filtered = filterFilter($scope.finalLeadData.dataval, newVal);
                                $scope.totalItems = $scope.filtered.length;
                                $scope.noOfPages =  Math.ceil($scope.totalItems / $scope.entryLimit);
                                $scope.currentPage = 1;
  
                            }, true);
                        });
  </code></pre>