<!-- To gain access to the array index: --> <ul> <li v-for="(game, index) in games"></li> </ul> <!-- You only want the index in specific cases. Use `:key` as standard. See the other greps. -->
<span v-for="role in user.roles"> <span v-if="role.name == 'Admin'">Yes</span> <span v-else>-</span> </span>
<div v-if="Math.random() > 0.5"> Now you see me </div> <div v-else> Now you don't </div>
<h1 v-if="variable">Vue is awesome!</h1>
<ul> <li v-for="(item, index) in items"> {{ index }} - {{ item }} </li> </ul>