The #bind{}
element allows you to bind data to
one or more elements using an efficient syntax. You define a
list of data, a list of elements, and a map of where the data
should be placed within the elements.
Optionally, you can specify a transform function on a
#bind{}
element. A transform function takes two
parameters, the row of data, and an accumulator, and can be
used to manipulate the data before it is ultimately bound to
the list of elements.
This demo shows two transform functions in action, one to toggle the case of the supplied data, and one to change the row color.
View Module SourceTitle | Author | Description | |
---|---|---|---|
Title 1 | Author 1 | Description 1 | |
Title 2 | Author 2 | Description 2 | |
Title 3 | Author 3 | Description 3 | |
Title 4 | Author 4 | Description 4 | |
Title 5 | Author 5 | Description 5 |