// Sample data in controller:
// this.Data.T = [[1,2,3,4],[1,2,3,4],[1,2,3,4]];
// Sample template (HTML file)
// 'this' in template is 'this.Data' in controller:
<div>${for_(this.T,
<div>$1{this}</div>
#$
</div>
<hr>
<table>${for_(this.T,
<tr>
<td>$1{this.length}</td>
$1{for_(this,
<td>$2{this}</td>
#$1
</tr>
#$
</table>
It’s possible to parse template using all ${ instead of $1{, $2{ but there are some some down sides:
${ will be not good for reading, as numbers will show the nested level${for — Top loop#$ — Top loop end$1 — Level 1 value$1{for — Level 1 loop#$1 — Level 1 loop end$2 — Level 2 value