0
我正在幫助使用多列表。在幫助程序中,您可以指定要顯示哪些對象列,並且嵌套每個循環都應該可以工作。我有我需要它們的值,但我無法獲得句柄以將內部字符串值用作外部值的關鍵字。將內部值作爲外部對象的鍵進行嵌套:把手
我有一個幾乎工作PLNKR here with all the code in it.,你可以玩。
它幾乎工程..
在那裏我有一個問題代碼的短的部分是:
<table>
{{#items}}
<tr >
{{#each ../colNames}}
<td>{{../this}}.{{this}}</td>
{{/each}}
<td>
<input type="checkbox"
id="masterList{{@index}}"
{{#if this.selected}}checked{{/if}}
onchange="{{../checkAction}}({{@index}})"
>
</td>
</tr>
{{/items}}
</table>
更具體:
<td>{{../this}}.{{this}}</td>
我已經試過的東西如:
<td>{{../this}}.[{{this}}]</td>
<td>{{../this}}.[this]}}</td>
<td>{{../this.this}}</td>
<td>{{../this.(this)}}</td>
最近我得到這樣的回報(與給予幫手「名」和「分數」列名):
<td>[object Object].name</td>
<td>[object Object].score</td>
在此先感謝您的任何想法解決或解決這一問題。