I want to use different components for admin panel-website. I try that;
// App.vue
<template>
<PanelTemplate v-if="$route.meta.template == 'panel'"/>
<WebsiteTemplate v-if="$route.meta.template == 'website'"/>
</template>
<script>
import PanelTemplate from './templates/PanelTemplate.vue'
import WebsiteTemplate from './templates/WebsiteTemplate.vue'
export default {
components : {
PanelTemplate,
WebsiteTemplate
}
}
</script>
// Router.js
{
path: "/panel/dashboard",
name : "panel-index",
component: PanelView,
meta : { template : 'panel' }
},
{
path : "/",
name : "website-index",
component : WebsiteView,
meta : { template : 'website' }
},
// PanelTemplate.vue - WebsiteTemplate.vue
<template>
<router-view></router-view>
</template>
But that's not working. I try component tag too but that's not working too. I am seeing just white screen, both of components not calling. What should I do?