forloop
Information about a parent for loop.
Properties
Returns true if the current iteration is the first. Returns false if not.
The 1-based index of the current iteration.
The 0-based index of the current iteration.
Returns true if the current iteration is the last. Returns false if not.
The total number of iterations in the loop.
The parent forloop object.
If the current for loop isn't nested inside another for loop, then null is returned.
{{#for collection.products as |product|}}
{{#for collection.products as |product|}}
{{ forloop.parentloop.index }} - {{ forloop.index }}
{{/for}}
{{/for}}
The 1-based index of the current iteration, in reverse order.
The 0-based index of the current iteration, in reverse order.
Was this article helpful to you?