hbs:使用变量作为HBS表达式中的索引

时间:2018-09-22 16:19:21

标签: node.js express-handlebars

我如何在车把中使用'itemIndex'作为项目的索引。

res.render('item',{
  items : item,
  itemIndex : 3
})

{{#each items.[itemIndex].links}}  
  {{this}}
{{/each}}

0 个答案:

没有答案