title: How to show info of how many items are displayed on every page, AngularJs Pagination
body: <p>My problem here Is how to show how many items are displayed on every page.</p>
  
  <p>Ex. I have 50 items displayed for paging. 10 on every page, so I want to have info about how many items are displaying currently. For example on the first page to be 'Displaying items from 1 to 10' , on the second page 'Displaying items from 11 to 20'... </p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;div ng-controller="MyCtrl"&gt;
      &lt;ul&gt;
          &lt;li ng-repeat="item in data | startFrom:currentPage*pageSize | limitTo:pageSize"&gt;
              {{item}}
          &lt;/li&gt;
      &lt;/ul&gt;
      &lt;button ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1"&gt;
          Previous
      &lt;/button&gt;
      {{currentPage+1}}/{{numberOfPages()}}
      &lt;button ng-disabled="currentPage &gt;= data.length/pageSize - 1" ng-click="currentPage=currentPage+1"&gt;
          Next
      &lt;/button&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>AngularJs</p>
  
  <pre><code>var app=angular.module('myApp', []);
  
  function MyCtrl($scope) {
      $scope.currentPage = 0;
      $scope.pageSize = 9;
      $scope.start = 0;
      $scope.end = 0;
      $scope.data = [];
  
      $scope.numberOfPages=function(){
          return Math.ceil($scope.data.length/$scope.pageSize);                
      }
  
      for (var i=0; i&lt;45; i++) {
          $scope.data.push("Item "+i);
      }
  }
  
  //We already have a limitTo filter built-in to angular,
  //let's make a startFrom filter
  app.filter('startFrom', function() {
      return function(input, start) {
          start = +start; //parse to int
          return input.slice(start);
      }
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/2ZzZB/2443/" rel="nofollow">JsFiddle Example</a></p>
  
  <p>Any suggestions? </p>