【发布时间】:2016-01-23 02:44:27
【问题描述】:
我使用流星 1.2
这是我的代码:
{{#each steps}}
{{#each buttons}}
<button class="car-action-button" data-step-index="{{../@index}}" data-button-index="{{@index}}" data="{{../idOnMap}}" data-cid="{{../../cid}}">
</button>
{{/each}}
{{/each}}
{{../@index}} 应该返回步数排名,但不返回任何内容。有没有办法做到这一点?
【问题讨论】:
-
您不需要咖啡脚本糖 (@),您在迭代的对象中有索引吗?因为 Meteor 不提供那个值
标签: javascript meteor meteor-blaze