I have table generated by mustache loop that looks like this:
names.mustache
<table class="table table-striped table-hover table-bordered">
<thead>
<tr>
<th>
#
</th>
<th>
Name
</th>
</tr>
</thead>
<tbody>
{{#allnames}}
{{#active}}
<tr>
<td>
{{count}}
</td>
<td>
{{name}}
</td>
</tr>
{{/active}}
{{/allnames}}
</tbody>
</table>
And I want to iterate count so that my table can have row numbers. basically, i initialized $count=1
. How can I implement that with clean efficient code? or is there a better simpler way?