Repeater
The Repeater
control renders a collection of items from its DataSource
property using a template:
<dot:Repeater DataSource="{value: Items}">
<p>{{value: Text}}</p>
</dot:Repeater>
A <p>
element will be rendered for every item in the Items
collection. Inside the Repeater
, the Binding Context changes to the item object itself.
Tasks
Let's display the To-Do items.
- Inside the
<body>
element, add aRepeater
withDataSource
bound toItems
. - Display a
<p>
element for every item in theItems
collection. - Bind the paragraph content to the
Text
property.
Message | Line | Column | |
---|---|---|---|