2

In handlebars.js or handlebars.net, is there a way to create an array and iterate over it in the template? I would like to do something like this:

<select name="hour">
  {{#each [1..24]}}
    <option>{{this}}</option>
  {{/each}}
</select>

I understand that I can create custom helpers to achieve this.

1 Answers1

0

Expressions like this are not supported. Your best bet is as you said, use a helper.

Rex M
  • 142,167
  • 33
  • 283
  • 313