Iterating over basic “for” loop using Handlebars.js

前端 未结 5 1140
轻奢々
轻奢々 2020-11-30 21:04

I’m new to Handlebars.js and just started using it. Most of the examples are based on iterating over an object. I wanted to know how to use handlebars in basic for loop.

5条回答
  •  无人及你
    2020-11-30 21:47

    Couple of years late, but there's now each available in Handlebars which allows you to iterate pretty easily over an array of items.

    https://handlebarsjs.com/guide/builtin-helpers.html#each

提交回复
热议问题