1<ul id="example-2">
2 <li v-for="(item, index) in items">
3 {{ parentMessage }} - {{ index }} - {{ item.message }}
4 </li>
5</ul>
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="(item, index) in items">
3 {{ index }} - {{ item }}
4 </li>
5</ul>
1<option v-for="(location, index) in locations" v-bind:value="location.id" v-bind:selected="index === 0">
2 {{ location.from }} - {{ location.to }}
3</option>