I come here because I can't find how to use "v-slot" when using the syntax leveraging a javascript object. This syntax I am talking about is the one presented in the course course Intro to Vue3 I followed (If this syntax has a particular name, apologize for my explanation: I would be happy to know it). Below screenshot shows an example:
I have a first file named ComponentToBeCalled.js, containing the following code for building a vue component:
app.component('component-to-be-called', {
data: function(){},
props: {},
template:
/*html*/
`<div>
SOME_HTML_HERE
</div>`,
computed: {},
methods: {}
})
I have a second file named ParentComponent.js with the following code for building another vue component:
app.component('parent-component', {
data: function(){},
props: {},
template:
/*html*/
`<div>
<slot name="SLOT_NAME"></slot>
</div>`,
computed: {},
methods: {}
})
--> My objective would be to build 'component-to-be-called' within 'parent-component'. From what I read, the classic syntax for defining a named slot in a CompenentToBeCalled.vue file would be:
<component-to-be-called>
<template v-slot:SLOT_NAME>
<div>
SOME_HTML_HERE
</div>
</template>
</component-to-be-called>
Do you know what is the equivalent when we play with a javascript object ?
__
