{{@index}}
can.mustache.helpers.index{{@index [offset]}}
Insert the index of an Array or can.List we are iterating on with #each
Parameters
-
offset
{Number}
The number to optionally offset the index by.
Insert the index of an Array or can.List we are iterating on with #each
{Number}
The number to optionally offset the index by.
Use
When iterating over and array or list of items, you might need to render the index of the item. Use the
@index
directive to do so. For example,The template:
Rendered with:
Renders: