jeudi 6 juillet 2017

How to use Ember action helper in element append to the DOM

First, I wanna let you know that I'm just starting at Ember, so, if is there a better way to accomplish the same result, feel free to point at that.

I have a component called "select-room", it should work as the fields "Quartos", "Adultos" and "Crianças" at this site.

In this site when the field "Quartos" is changed, will be added or removed more selects fields on the form, the same happen when the value of "Crianças" change. I was able to accomplish this behavor using DOM manipulation, but when appending a select field like this html+= ''; the action helper don't work.

Link to the full code is at this repo in Github: http://ift.tt/2suoBQA

What is the best to way to solve this problem?




Aucun commentaire:

Enregistrer un commentaire