I'm having an issue with my router. I'm trying to display bodyComponent on my index page, but nothing is happening. I'm using laravel+vue. Can anyone point out where I might be going wrong?
Here's my router:
import Vue from 'vue'
import VueRouter from 'vue-router'
import bodyComponent from '../views/bodyComponent'
Vue.use(VueRouter)
const router= new VueRouter({
mode: "history",
routes:[
{
path:"/",
components: {
default: bodyComponent,
}
}
]
})
export default router;
My app.js file:
import router from "./router"
const app = new Vue({
el: '#app',
router
});
Here's my index.blade.php:
<div id="app">
<header-component></header-component>
<!--<body-component></body-component>-->
<router-view></router-view>
<footer-component></footer-component>
</div>