0๐
You need to declare your base path in touter config like this :
export default new VueRouter({
mode:'history',
routes:[
{ path: '/:listing', component: ListingPage, name: 'listing' }
],
base:'/listing',
root:'/',
});
- [Vuejs]-Change ownership of Vue Component
- [Vuejs]-Why do i keep getting "connection to the server was unsuccessful. (http://localhost:12896/)"?
0๐
I think that inside of
"render: h => h(App)"
you can use
components: {App},
template: '<App></App>'
Then the app.js code will be like:
import router from './router';
import App from '../components/App.vue';
var app = new Vue({
el: '#app',
components: {App},
template: '<App></App>',
router
});
I hope that works.
best regards!
Source:stackexchange.com