Click in order · Vue.js course · Module 2: Template Syntax

v-for Syntax with key

Arrange the v-for syntax with :key (v-for first, then :key):

Items to click

  • <li
  • >
  • :key="item.id"
  • v-for="item in items"
Show the answer

Correct order:

  1. <li
  2. v-for="item in items"
  3. :key="item.id"
  4. >