Dear devs,
Is there any way to access the index inside of a loop? Like AngularJS $index.
Use case:
This data
{
"products": [
"Windows",
"Mac OSX",
"Ubuntu"
]
}
And this template, or something similar
{#products}
{$index} - {.}
{/products}
To generate this
1 - Windows
2 - Mac OSX
3 - Ubuntu
Of course, I could generate the index along with the data, but I'd like to handle it at template level, if possible, not at data level.
Dear devs,
Is there any way to access the index inside of a loop? Like AngularJS $index.
Use case:
This data
And this template, or something similar
To generate this
Of course, I could generate the index along with the data, but I'd like to handle it at template level, if possible, not at data level.