Chapter quiz · Templates & Directives

Test what you learned.

8 questions on Templates & Directives. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Templates & Directives — Chapter Quiz

Eight questions on v-if, v-for, v-model, event modifiers, class binding, and slots.

0/ 9
  1. Question 1
    1

    What is the difference between v-if and v-show?

  2. Question 2
    2

    Why does each v-for item need a unique :key?

  3. Question 3
    3

    v-model on an <input> is shorthand for:

  4. Question 4
    4

    What does @click.stop do?

  5. Question 5
    5

    How do you conditionally apply two classes based on state?

  6. Question 6
    6

    A scoped slot lets the child component pass data back up to the parent slot content.

  7. Question 7
    7

    The default slot can be referenced explicitly with <template #___>.

  8. Question 8
    8

    Which are valid built-in Vue directives?

    Select all that apply.

Pick an answer — instant feedback as you go.