I'm using this perfectly working pagination solution.
It has a feature: it asks the server the whole set of data. I would like only a portion of it to be requested.
What do i need to do in ember-data to configure my requests so that they include some more parameters with the page info?
thank you
UPDATE: done in this way:
App.Books = Ember.Route.extend
setupController: (controller, model) ->
controller.set 'content', App.Book.find({page_number: controller.get('currentPage')})
You can send query to find method of the DS.Model. So if you have endpoint that follows OData protocol you would do this:
App.Post.find({ '$top': 10, '$skip': 0 });
and it would return you only first 10 posts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With