BorisMoore / jsrender

A lightweight, powerful and highly extensible templating engine. In the browser or on Node.js, with or without jQuery.
http://www.jsviews.com
MIT License
2.68k stars 340 forks source link

Possible to make more iteration than element count ? #237

Closed loppp closed 10 years ago

loppp commented 10 years ago

Hi, recently I started to use jsrender, my client needs a table with 5 rows, if there're only 3 data items, the table will be filled with 3 rows and leave the other 2 blank.

when I use jsrender, I used template like following,

<script id="TmpOperation" type="text/x-jsrender">
<tr>
<td>{{:name}}</td>
</tr>
</script>

My Problem is, it will not generate 5 rows if the data item is less than 5, how can I generate blank rows ?

loppp commented 10 years ago