The vdl-repeat-contents attribute
The vdl-repeat-contents attribute is placed on a VDL or HTML element to repeat the contents of that element by iterating over a collection. This differs from a vdl-repeat attribute, which will also include the element it is assigned to in the repeated blocks.
The VDL expression syntax is:
=<variable> in <collection>Where <variable> is a symbol of your choice that can be referenced by further expressions, and <collection> is either a Set entity, Scenarios on the shelf, or a JavaScript array.
This example applies the vdl-repeat-contents attribute to a list item containing a text element which references the scenario name.
Code editor
<vdl-row>
<vdl-column>
<ul vdl-repeat-contents="=s,i in scenarios">
<li>
<span vdl-text="=s.props.name"></span>
</li>
</ul>
</vdl-column>
</vdl-row>
View Designer
Using vdl-repeat-contents on a list in the View Designer
Using the vdl-repeat-contents attribute
In the pane, click and drag a Repeat Contents component onto the element with the content you wish to repeat.
