mardi 13 octobre 2015

How to use json-api pagination links in Ember 2.x?

Currently I'm working on app using Rails (4.1.0) API and Ember (2.1.0) and I'm having hard time making pagination in Ember side works.

Rails API JSON output includes automatically made pagination links (from combination of JSON API adapter in AMS and Kaminari pagination) like this:

"links": {
    "self": "http://ift.tt/1G2NUi6",
    "first": "http://ift.tt/1hC9uhm",
    "prev": "http://ift.tt/1hC9wG3",
    "next": "http://ift.tt/1G2NUi8",
    "last": "http://ift.tt/1hC9uho"
  }

Could anyone give me a hint how to get to those values in Ember-Data, in order to use them in Ember template? Has anybody found a temporary workaround for this problem (as Ember is probably going to be fully JSON API compatible one day)?

Every bit of help will be very appreciated ;)

Reference to combination of JSON API adapter in AMS and Kaminari pagination: http://ift.tt/1G2NUia




Aucun commentaire:

Enregistrer un commentaire