I've been using Ember-Data very well where my API endpoints are like
domain.com/apples/ => list of apples
domain.com/apples/1/ => Apple with id 1
domain.com/worms/ => list of worms
I need to fetch all the worms in one apple. My API endpoint for this is like
http://ift.tt/2jISfk1 => list of worms in apple with id 1
I've been fetching those worms with Em.$.getJSON(...) and works fine. But the result is a list of Object and I want a list of Worm (defined in /models/worms.js)
Aucun commentaire:
Enregistrer un commentaire