Menu
×
×
Correct!
Exercise:What directives are needed to provide data from a components slot to the parent?
Local data in a component is sent from a slot with @(6),
and it can be received in the parent with @(6).
CompOne.vue:
<slot @(6):lclData="data"></slot>
App.vue:
<comp-one @(6):"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>
Local data in a component is sent from a slot with v-bind,
and it can be received in the parent with v-slot.
CompOne.vue:
<slot v-bind:lclData="data"></slot>
App.vue:
<comp-one v-slot:"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>
Local data in a component is sent from a slot with v-bind,
and it can be received in the parent with v-slot.
CompOne.vue:
<slot :lclData="data"></slot>
App.vue:
<comp-one v-slot:"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 54 exercises.
Are you sure you want to continue?