parent
ec30b39ffb
commit
fd4206b989
1 changed files with 27 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||||
|
import Vue from 'vue' |
||||||
|
import VueRouter from 'vue-router' |
||||||
|
import Home from '../views/Home.vue' |
||||||
|
import posts from '../views/posts.vue' |
||||||
|
|
||||||
|
Vue.use(VueRouter) |
||||||
|
|
||||||
|
const routes = [ |
||||||
|
{ |
||||||
|
path: "/", |
||||||
|
name: "Home", |
||||||
|
component: Home, |
||||||
|
}, |
||||||
|
{ |
||||||
|
path: "/posts", |
||||||
|
name: "Posts", |
||||||
|
component: posts, |
||||||
|
}, |
||||||
|
] |
||||||
|
|
||||||
|
const router = new VueRouter({ |
||||||
|
mode: "history", |
||||||
|
base: process.env.BASE_URL, |
||||||
|
routes, |
||||||
|
}) |
||||||
|
|
||||||
|
export default router |
Loading…
Reference in new issue