1<ul id="example-2">
2 <li v-for="(item, index) in items">
3 {{ parentMessage }} - {{ index }} - {{ item.message }}
4 </li>
5</ul>
1<div v-for="item in itens" :key="item.id">
2 {{ item.text }}
3</div>
4
5// if you need the index
6
7<div v-for="(item, index) in items">
8 {{ index }} - {{ item.message }}
9</div>
10
1<!-- To gain access to the array index: -->
2<ul>
3 <li v-for="(game, index) in games"></li>
4</ul>
5<!--
6 You only want the index in specific cases. Use `:key` as
7 standard. See the other greps.
8-->
1<ul>
2 <li v-for="(val, index) in arr">
3 <!-- Do something... -->
4 </li>
5</ul>