v-if
In string templates, for example Handlebars, we would write a conditional block like this:
<!-- Handlebars template -->
{{#if ok}}
<h1>Yes</h1>
{{/if}}
In Vue.js, we use the v-if directive to achieve the same:
<h1 v-if="ok">Yes</h1>
It is also possible to add an “else” block with v-else:
<h1 v-if="ok">Yes</h1>
<h1 v-else>No</h1>
Template v-if
Because v-if is a directive, it has to be attached to a single element. But what if we want