Paginate your Firebase 3.0 collections with JavaScript
- NPM:
npm install --save firebase-paginator
- Bower:
bower install --save firebase-paginator
npm install
npm test
If you're in Node.js, you'll need to do something like var FirebasePaginator = require('firebase-paginator')
.
If you're in the browser, you'll have access to FirebasePaginator on the window
object like so: var FirebasePaginator = window.FirebasePaginator;
Once you have your FirebasePaginator
object, the rest is isomorphic JavaScript. Just pass in a Firebase ref and start configuring.
var paginator = new FirebasePaginator(ref);