how to handle pagination with Backbone.Marionette

Viewed 5067

I have a collection that is populated using from an external API, the API returns a number of objects + paging details for further objects, then I would like to show probably only a subset of these objects in my views, but allow for further paginated view too

To explain my situation a bit better:

  1. fetch 20 results from the server, get pagination data for further pages
  2. show 10 results + more button
  3. clicking more, shows 10 results + more button
  4. clicking more, fetches 20 results from server, shows 10 results + more button ...

what would be your solution? I've found Backbone.Paginator, but I don't know how well does it integrates with Marionette, or if there exists already a Backbone.Marionette.Paginator extension :)

2 Answers
Related