I am trying to specify the index of an item in an array within a handlebars template:(我试图在把手模板中指定数组中项目的索引:)
{
people: [
{"name":"Yehuda Katz"},
{"name":"Luke"},
{"name":"Naomi"}
]
}
using this:(使用这个:)
<ul id="luke_should_be_here">
{{people[1].name}}
</ul>
If the above is not possible, how would I write a helper that could access a spefic item within the array?(如果以上是不可能的,我如何编写一个可以访问数组中的spefic项的帮助器?)
ask by lukemh translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…