Table of Contents

For Clause

// 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>

Technical Design

It’s possible to parse template using all ${ instead of $1{, $2{ but there are some some down sides:

Readings