The Vue v-if directive conditionally shows an element according to application state. It lets an HTML template express behavior without manually managing the element’s visibility. section 1.3.1
Conditional paragraph
When hasDiscount is true, Vue displays the paragraph; otherwise, the conditional element is not shown. section 1.3.1
<p v-if="hasDiscount"> You get a discount! </p>
A Vue template places v-if directly on the element whose display depends on application state. section 1.3.1
