diff options
Diffstat (limited to 'src/router')
-rw-r--r-- | src/router/index.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..c67b61d --- /dev/null +++ b/src/router/index.js | |||
@@ -0,0 +1,31 @@ | |||
1 | import Vue from 'vue' | ||
2 | import VueRouter from 'vue-router' | ||
3 | import Home from '../views/Home.vue' | ||
4 | import Register from '../views/Register.vue' | ||
5 | import Login from '../views/Login.vue' | ||
6 | |||
7 | Vue.use(VueRouter) | ||
8 | |||
9 | const routes = [ | ||
10 | { | ||
11 | path: '/', | ||
12 | name: 'Home', | ||
13 | component: Home | ||
14 | }, | ||
15 | { | ||
16 | path: '/register', | ||
17 | name: "register", | ||
18 | component: Register | ||
19 | }, | ||
20 | { | ||
21 | path: '/login', | ||
22 | name: "login", | ||
23 | component: Login | ||
24 | } | ||
25 | ] | ||
26 | |||
27 | const router = new VueRouter({ | ||
28 | routes | ||
29 | }) | ||
30 | |||
31 | export default router | ||