In parse, I set params based on response (page for current page, pages for total pages)
When fetching again, increment page counter by one and fetch
Then append models to collection, and append a view for each model to the collection view
What I'm completely lost about, is how do I re-fetch the collection on client after getting the initial payload from server... (let's say for simplicity's sake, binding it as an event on a "Next Page" button).
I've tried several things (among other things overwriting fetch on the collection), but can't figure out a sensible way to do this in Rendr. Any guidance would be greatly appreciated, and I'll gladly turn it into a PR documenting it.
What eversion of rendr are you using? I found a bug with 1.0.0 (and earlier) that when you say fetch the params get overridden with an empty object :( - it is fixed in 1.0.1
Hey guys,
I'm having some trouble getting query parameters and fetching to work properly. What I'm trying to build is quite easy in Backbone:
parse
, I set params based on response (page
for current page,pages
for total pages)What I'm completely lost about, is how do I re-fetch the collection on client after getting the initial payload from server... (let's say for simplicity's sake, binding it as an event on a "Next Page" button).
I've tried several things (among other things overwriting
fetch
on the collection), but can't figure out a sensible way to do this in Rendr. Any guidance would be greatly appreciated, and I'll gladly turn it into a PR documenting it.