Let's say I have a JSON API where I can access two models: cats and dogs. However, on my Ember application I only have one model: animals.
Although every time I save() an animal, it's POSTed to the API as a cat, if I receive a dog linked in any other model it should be locally stored as an animal by ember-data.
What would be the most coherent way to achieve this? Thank you!
Aucun commentaire:
Enregistrer un commentaire