๋ฐ์ํ
var router = new VueRouter({
//mode: 'history',
routes : [
{ path: '/', redirect: '/profile' },
{ path: '/order', component: Order },
{ path: '/profile', component: Profile,
children: [
{ path: '', component: ProfileTab1 },
{ path: 'tab1', component: ProfileTab1 },
{ path: 'tab2', component: ProfileTab2 },
]
},
{ path: '*', component: NotFoundComponent }
]
});
alias ์ฌ์ฉ
routes: [
{ path: '/foo', component: Foo, alias: '/bar'}
]
https://github.com/vuejs/vue-router/blob/dev/examples/route-alias/app.js
https://stackoverflow.com/questions/44916403/vuejs-vue-router-match-multiple-paths
https://stackoverflow.com/questions/44060414/vue-router-redirect-to-default-path-issue
๋ฐ์ํ
'Web > Vue' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Vue.js] Grid (0) | 2022.06.07 |
---|---|
[Vue.js] vue-router.js cdn ์ค๋ฅ (0) | 2022.05.04 |
[Vue.js] CLI ์ค์นํ๊ธฐ (0) | 2020.12.14 |
[Vue.js] Vuetify, v-data-table (0) | 2020.12.02 |
Vuetify, refs (0) | 2020.11.27 |