angular-simple-pagination
v1.0.5
Published
angular pagination directive
Downloads
15
Maintainers
Readme
Angular Simple Pagination
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
Tasks
gulp build
gulp test