Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Simple Pagination


GitHub build GitHub tag GitHub license

About

Simple pagination directive for AngularJS. It's tested against angular 1.4.8.

Installation

npm install angular-simple-pagination

Usage

Module:

angular.module('YOUR_MODULE', ['angularSimplePagination']);

Controller:

angular.module('YOUR_MODULE').controller(function($scope) {
  $scope.settings = {
    currentPage: 0,
    offset: 0,
    pageLimit: 5,
    pageLimits: ['10', '50', '100']
  };

  $scope.items = [...];
  $scope.callback = function() { ... };
});

HTML:

<simple-pagination
  current-page="settings.currentPage"
  offset="settings.offset"
  page-limit="settings.pageLimit"
  page-limits="settings.pageLimits"
  on-update="callback()"
  total="items.length">
</simple-pagination>

<div ng-repeat="item in (items | limitTo:settings.pageLimit:settings.offset)">
...
</div>

Demos

  1. Simple example

Tasks

gulp build
gulp test

About

AngularJS pagination directive

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages