I have a list of attribute names attrs
that I would like to iterate over, creating an input with a binding to that attribute on the model for each for each. The below expresses the functionality I'm after:
{{#each attr in attrs}}
{{input value=model.get(attr) }}
{{/each}}
Of course this does not actually work, because you can't make method calls in a helper. I found this question, but the solution doesn't work in my version of Ember (1.11.0)-- I gather because this
is undefined in a helper definition as of version 1.11.0 (see ).
How can I make this work?
Aucun commentaire:
Enregistrer un commentaire