Enter a search term above to see results...
On This Page
Loops
Types of Loops
Each
A basic each loop allows you to access properties of a collection inside the loop directly
each
loops can improve readability of templates in simple use-cases.
Each…In
You can define each item of a loop using each...in
syntax.
each...in
loops can help make templates more readable when using multiple levels of looping.
Special Values
Index
The value @index
can be used to get the current loop index.
This can be used with helpers like numberFromIndex
to output non-zero indexed values.
This
When looping over values like strings or numbers without the each...in
syntax you can use the keyword this
to access the value.
Using Expressions
Template Instance
Iterables can be the results of expressions, for instance pulling a set of values from your component
Global Helpers
Global helpers can be used to generate iterables like number ranges.
Example
The following example uses loops with snippets to output values into a table.