Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mercmobily/hot-pager
https://github.com/mercmobily/hot-pager
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mercmobily/hot-pager
- Owner: mercmobily
- License: mit
- Created: 2016-08-09T09:58:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-06T01:40:09.000Z (over 5 years ago)
- Last Synced: 2024-11-10T13:49:49.339Z (2 months ago)
- Language: HTML
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`hot-pager`
Pager element for HotplateThis is a very simple, basic pager. All it does is display all of the pagerData items, using a dom-repeat template.
A common way of using it is a follows;
Name: {{item.name}}
Surname: {{item.surame}}
Here:
* `hot-network` is used to make sure that network resilience is handled. Note that hot-network's target is the `iron-ajax` element. This is strongly recommended.
* The `iron-ajax` element is wrapper with `hot-ajax-paging`. This will make sure that `idon-ajax` has the right headers set for each request, depending of what page is requested.
* The data (coming from the bound property `data` in `iron-ajax`) is displayed with a typical `dom-repeat`
* The pager is used, passing it `pagerData`. Here, `pagerData` will always be changed by `hot-ajax-paging`, and will depend on the page requested by the user as well as the number of results returned by the AJAX queryThis is only example code. Custom pagers could show more information (such as the total number of records, etc.) and look very different. This is a basic starting point, where the most commong example of pagination is shown.
Most importantly, _all_ possible calculations are already done in `pagerData`.