How can I place an element within another element, created by the function component
of Vuejs?
I have my code created with the Vuejs template, but I want to create elements within other elements, but I get an error and it shows nothing.
Let's say I want to be able to do something like this:
<div id="app">
<my-element id="element" v-for="data in 1000">
<my-child id="child">{{ data }}</my-child>
</my-element>
</div>
And this is my Vuejs script:
new Vue({
el: '#app',
componentes: {
my-element: {
props: {
id: ''
},
template: '<div class="content"></div>'
},
my-child: {
props: {
id: ''
},
template: '<div class="child"></div>
}
}
});
The official page of this template is here , is based on javascript.