Vue Directives Flashcards

1
Q

what is a directive

A

place holder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add String data to vue.

A

Updates the element’s textContent. If you need to update the part of textContent, you should use {{ Mustache }} interpolations.

<span></span>

<span>{{msg}}</span>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to show raw html

A

v-html

<div></div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to toggle an elements deisplay css property

A

v-show

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

provide an if statmement

A

v-if

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

provide an else statement

A

v-else

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

provide an else if

A

v-else-if

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how to create a for loop

A

v-for=”item in items”

note use :key=”item.id”

something unique to iterate over

note should extend this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you attach and event listener to an element.

A

v-on:

shorthand … @

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you bind an attribute or component to an expression

A

v-bind

shortand…. :

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

create a two way binding on a form of input

A

v-model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you denote a named slot that expect to receive props

A

v-slot

shorthand…. #

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

displaying raw mustache tags.

A

v-pre

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This directive will remain on the element until the associated Vue instance finishes compilation.

A

v-cloak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Render the element and component once only.

A

v-once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly