Pager UI component
JavaScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
example.html
index.js
package.json
pager.css
template.html
template.js

Readme.md

pager

Pager ui component.

Installation

$ component install component/pager

Events

  • show (n) emitted when a page is selected (0-based)

API

Pager#total(n)

Set the total number of items to n.

Pager#perpage(n)

Set the number of items per page to n. [5]

Pager#pages()

Return the total number of pages.

Pager#show(n)

Select page n, .render(), and emit "show".

Pager#select(n)

Select page n and .render().

Pager#render()

Re-render the pager.

License

MIT