在我的车把模板中,我有这个循环:
{{#each itemController="fund"}}
<li>
<label>{{title}}</label>
<span>{{amount}}</span>
{{input type="text" placeholder="new user"
value=newFullName action="createUser"}}
{{partial 'user-list'}}
</li>
{{/each}}
Run Code Online (Sandbox Code Playgroud)
并且需要将当前对象作为参数传递给'createUser'动作.像这样的东西:
action="createUser(this)"
Run Code Online (Sandbox Code Playgroud)
要么:
action 'createUser' this
Run Code Online (Sandbox Code Playgroud)
但似乎ember无法处理输入字段内的操作参数......
我错过了什么吗?