Created
February 20, 2019 12:49
-
-
Save takuya-nakayasu/02b38c6cf9aa81e1a741578ca53cdb17 to your computer and use it in GitHub Desktop.
vue-routerの設定ファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Router from 'vue-router' | |
import Dashboard from '../components/pages/Dashboard' | |
import Heroes from '../components/pages/Heroes' | |
import HeroDetail from '../components/pages/HeroDetail' | |
Vue.use(Router) | |
export default new Router({ | |
routes: [ | |
{ | |
path: '/', | |
component: Dashboard | |
}, | |
{ | |
path: '/heroes', | |
component: Heroes | |
}, | |
{ | |
path: '/dashboard', | |
component: Dashboard | |
}, | |
{ | |
path: '/detail/:id', | |
name: 'Detail', | |
component: HeroDetail | |
} | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment