Pager ui component.
This is a component component. You can easily plug it into your site or web app. Check the example of usage in test/index.html. To get things working, follow these easy steps (assuming you already have Node.js and npm installed):
npm install -g component
- Clone this repository and navigate into the component folder
- Run
component install
to fetch dependencies - Run
component build
- Now you can open test/index.html and if everything is fine you should be able to see the component in action
show
(n) emitted when a page is selected (0-based)
Set the total number of items to n
.
Set the number of items per page to n
. [5]. Pager will calculate number of page links by dividing total amount of items on perpage value.
Specify size of the links window. n
means amount of page links to the left and right from the current page. ...
will be added to the start and end of the links window.
Return the total number of pages.
Select page n
, .render()
, and emit "show".
Select page n
and .render()
.
Re-render the pager.
MIT