首页 > 解决方案 > Aurelia:使用索引值来增加输入绑定中的数组值

问题描述

我正在尝试在 value.bind 指令中增加一个数组值,以便在此示例中创建三行,增加数组编号:

<tr repeat.for="i of 3">
    <td><input  type="text" value.bind="GS.qData.estate[**${$index}**].name"></td>
**strong text**</tr>

我尝试了几种排列方式({$i} 等),但似乎没有任何效果。

标签: aureliaaurelia-templating

解决方案


进一步的研究似乎表明中继器不会这样做,所以我有其他解决方案。谢谢回复。


推荐阅读