I would like to use v-for to render list of components from the list I have in data.
This is my code
<template>
<ticket-panel/>
<user-panel/>
<map-panel/>
<info-panel/>
<product-panel/>
</template>
I want to do something like this
<template v-for="component in components" :key="name">
??? <component> ???
</template>
data: function() {
return {
components: [
{ name: "ticket-panel" },
{ name: "user-panel" },
{ name: "map-panel" },
{ name: "info-panel" },
{ name: "product-panel" }
]
}
}
How to write <template> or <componentName> so it renders properly? I used Google a lot but I did not find any close answer.