Put in order · Vue.js course · Module 1: Vue and Vite

Advanced: v-if directive syntax

Arrange the syntax for conditional rendering of an element:

Items to put in order

  • >
  • Active</div>
  • <div
  • v-if="isActive"
Show the answer

Correct order:

  1. <div
  2. v-if="isActive"
  3. >
  4. Active</div>