I have a group of option tags inside a select. Is there a way to generate these tags for x to y using mustache?
The only way I could think of now is to create an array from 1 to 10 in the controller, then use that variable as a section in the template. Is there a template-only solution?
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
Put the
selecttag outside of the data and the option tag inside. Each loop of the data creates a new option.