Reputation: 3444
I have a simple repeat.for:
<li repeat.for="item of items">${item}</li>
Currently I'm using: ${$parent.items.indexOf(item)}
.
Is there a shorthand, something like {{$index}} in angular?
Upvotes: 66
Views: 19235
Reputation: 12295
There is. Write this:
<li repeat.for="item of items">${$index} - ${item}</li>
Upvotes: 119