dimanche 19 avril 2015

Edit in Ember with Ember data an object and its sub-collection in one form

I am working on an application with Ember + Ember Data.


I have a model "Tax" with a collection of "Sub-Regions". I also created a list of tax objects, with an Edit button. When a user goes to edit, I have created a form, that has fields for the properties of Tax, as well as a list of Subregions with a text input field to modify the default tax rate for the subregion. What I would like to do is to be able to save in one action the object Tax and all the items of the sub-collection. I'm stuck creating that action, not sure how to approach that problem.


I've put a sample here: http://ift.tt/1D3SSCC


I come from a back-end background and I know how I would solve it using MVC with page refresh, but not sure how to do it in Ember.


Aucun commentaire:

Enregistrer un commentaire