1<h1 v-if="awesome">Vue is awesome !</h1>
2<h1 v-else-if="sowSow">Vue is not very nice !</h1>
3<h1 v-else>Vue is baaaad !</h1>
1<div v-if="Math.random() > 0.5">
2 Now you see me
3</div>
4<div v-else>
5 Now you don't
6</div>
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<span v-for="role in user.roles">
2 <span v-if="role.name == 'Admin'">Yes</span>
3 <span v-else>-</span>
4</span>
5
1<ul>
2 <li v-for="(item, index) in items">
3 {{ index }} - {{ item }}
4 </li>
5</ul>