66

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?

bekite
  • 3,444
  • 2
  • 23
  • 31

1 Answers1

117

There is. Write this:

<li repeat.for="item of items">${$index} - ${item}</li>
Matthew James Davis
  • 12,134
  • 7
  • 61
  • 90