Answer the question
In order to leave comments, you need to log in
How to correctly connect VueRouter via cdn?
I connected scripts in the head tag as follows:
In main.js, when I write mode: 'history'
, nothing is displayed:
const routes = [
{path: '/', name: 'blank', component: BlankPage},
{path: '/directory1', name: 'directory1', component: Directory1},
{path: '/directory2', name: 'directory2', component: Directory2},
{path: '/directory3', name: 'directory3', component: Directory3},
]
const router = new VueRouter({
routes,
mode: 'history'
})
const app = new Vue({
router,
}).$mount('#app')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question