-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
46 lines (41 loc) · 1.51 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Vue from 'vue'
import Router from 'vue-router'
import page2 from '../components/page2'
import page3 from '../components/page3'
import home from '../components/Home'
import about from '../components/About'
import todosNew from '../components/Todos/new'
import todosIndex from '../components/Todos/Index'
import tasksNew from '../components/Tasks/new'
import tasksIndex from '../components/Tasks/Index'
import tasksShow from '../components/Tasks/show'
import tasksEdit from '../components/Tasks/edit'
//user
import usersLogout from '../components/Users/Logout'
import usersLogin from '../components/Users/Login'
import usersCheck from '../components/Users/check'
import usersTestAuth from '../components/Users/test_auth'
Vue.use(Router)
//
export default new Router({
/* mode: 'history', */
routes: [
{ path: '/', component: home },
{ path: '/about', component: about },
{ path: '/page2', component: page2 },
{ path: '/page3', component: page3 },
/* users */
{ path: '/logout', component: usersLogout },
{ path: '/login', component: usersLogin },
{ path: '/users/check', component: usersCheck },
{ path: '/test_auth', component: usersTestAuth },
/* todos */
{ path: '/todos/new', component: todosNew },
{ path: '/todos', component: todosIndex },
/* tasks */
{ path: '/tasks/new', component: tasksNew },
{ path: '/tasks', component: tasksIndex },
{ path: '/tasks/show/:id', component: tasksShow },
{ path: '/tasks/edit/:id', component: tasksEdit },
]
})