DomTemplate
DomTemplate copied to clipboard
data-bind:list
To make things nice and simple with nested lists, a new bind key can be used to specify which property of the bound object should be used for automatically binding the nested list.
<ul>
<li>
<h1 data-bind:text="name">Name goes here</h1>
<p>Categories:</p>
<ul data-bind:list="categories">
<li data-template data-bind:text="name">Category name goes here</li>
</ul>
</li>
</ul>
$iterable = getListOfThings();
$iterable[0]->categories = getCategoriesForThing(); // silly example, but it makes sense
$binder->bindList($iterable);