1.0.3 • Published 8 years ago

ng-paginator v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Ng-paginator

npm version

Pagination component for Angular 1.x, displaying the sequence of numbers assigned to pages in a book or periodical.

Demo

Usage

Install

npm i --save ng-paginator

Add library to your page

<script src="node_modules/ng-paginator/dist/ng-paginator.js"></script>

You should use minified version (ng-paginator.min.js) in production.

Add dependency in your application's module definition

var application = angular.module('application', [
  // ...
  'ngPaginator'
]);

Use ng-paginator in your html

<ng-paginator total-pages="25" current-page-id="1" visible-range-limit="4" on-click="vm.onPageClick(data)"></ng-paginator>

API

AttributesDescription
{integer} total-pagestotal number of pages.
{integer} current-page-idcurrent page id.
{integer} visible-range-limitnumber of page links to be visible one at a time.
{function} on-clickcallback to be called everytime user clicks a page link.

Feedback

If you have found a bug or have another issue with the library — please create an issue.

If you have a question regarding the library or it's integration with your project — consider asking a question at StackOverflow and sending me a link via E-Mail. I will be glad to help.

Have any ideas or propositions? Feel free to contact me by E-Mail.

Cheers!

Developer guide

Fork, clone, create a feature branch, implement your feature, cover it with tests, commit, create a PR.

Run:

  • npm i to initialize the project
  • gulp to re-build the dist files
  • karma start to test the code

Do not add dist files to the PR itself. We will re-compile the module manually each time before releasing.

Support

If you like this library consider to add star on GitHub repository.

Thank you!