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:
- Forward query parameters onto Collection fetch call
- 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.
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 (pagefor current page,pagesfor 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
fetchon 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.