Ember.js: TextField with dynamic binding

前端 未结 3 1355
被撕碎了的回忆
被撕碎了的回忆 2021-01-25 05:22

I want to bind a TextField to a property which is specified by a string variable (see the edit for a better explanation), as in this question. Unfortunately the answer that was

3条回答
  •  一整个雨季
    2021-01-25 06:24

    You can bind input values with dynamic keys(variables) of objects with help of mut helper now.

    https://guides.emberjs.com/v2.6.0/templates/input-helpers/#toc_binding-dynamic-attribute

    We can bind key in input helper like this,

    {{input value=(mut (get Object key))}}
    

提交回复
热议问题