kt5*_*511 0 handlebars.js ember.js
我知道在纯 html 中有一种方法可以要求该字段具有某种价值。我相信这是“需要输入”。但是,我不确定如何使用车把在 ember 中完成此操作。我试过这个,但没有成功:
{{input required value=tax class="form-control" placeholder="State Tax"}}
提前致谢。
小智 5
在 ember 输入助手中,您总是必须为属性赋值。像<input disabled required value="..."/>在 html 中没有值的快捷方式在车把中是不允许的。相反,你必须写{{input disabled=true required=true value="..."/>
<input disabled required value="..."/>
{{input disabled=true required=true value="..."/>
用你的例子看 ember twiddle:https ://ember-twiddle.com/b073b4551065e8884056de55fe0c9800?openFiles = templates.application.hbs%2C
归档时间:
8 年 前
查看次数:
1410 次
最近记录: