Initializing help system before first use

vdl-repeat-contents

Copy the contents of the element containing the vdl-repeat-contents attribute for each item in a Set, scenario on the shelf, or each element in a plain JavaScript array. This differs from vdl-repeat as it will not repeat the element which the vdl-repeat-contents attribute is on, only its contents.

Example

<p>This will show a list item per set element. It won't repeat the ul element.</p>
<ul vdl-repeat-contents="=factory,index in scenario.entities.Factories">
  <li vdl-text="=index + ': ' + factory.value"></li>
</ul>

Attributes

vdl-repeat-contents An expression in the form: "=x,y in expression", where "x" is the value of the current item, "y" is the current loop count and "expression" is a standard JavaScript expression that returns a Set, list of scenario or plain array. The loop variables, "x" and "y", can be referenced by any descendant element but not on the element containing the vdl-repeat-contents. accepts expression required