可见
<div id='app'>
<router-link to="/profile" class="nav-link">
<i class="icon ion-person"></i>
View Profile
</router-link>
</div>
<div class="slim-mainpanel">
<div class="container pd-t-50">
<router-view></router-view>
</div>
</div>
在app.js中
require('./bootstrap');
window.Vue = require('vue');
import VueRouter from 'vue-router'
Vue.use(VueRouter)
let routes = [
//{ path: '/dashboard', component: require('./components/Dashboard.vue').default },
{ path: '/editprofile', component: require('./components/Editprofile.vue').default },
{ path: '/profile', component: require('./components/Profile.vue').default },
//{ path: '*', component: require('./components/NotFound.vue').default }
]
const router = new VueRouter({
mode: 'history',
routes // short for routes: routes
})
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
const app = new Vue({
router,
}).$mount('#app');
在这里,当我从路由器链接上的html单击时,它不起作用。它只是显示文本而不是链接。 我应该如何在laravel项目中使用vue js创建链接。