-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrouter.js
81 lines (80 loc) · 1.73 KB
/
router.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import Vue from 'vue'
import Router from 'vue-router'
import Recipes from './views/Recipes.vue'
import Login from './views/Login.vue'
import Signup from './views/Signup.vue'
import CreateRecipe from './views/CreateRecipe.vue'
import EditRecipe from './views/EditRecipe.vue'
import EditProfile from './views/EditProfile.vue'
import EditPassword from './views/EditPassword.vue'
import NotFound from './views/NotFound.vue'
import FavoriteRecipes from './views/FavoriteRecipes.vue'
import MyRecipes from './views/MyRecipes.vue'
import Recommend from './views/Recommend.vue'
Vue.use(Router)
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'home',
component: Recipes
},
{
path: '/login',
name: 'login',
component: Login
},
{
path: '/signup',
name: 'signup',
component: Signup
},
{
path: '/CreateRecipe',
name: 'CreateRecipe',
component: CreateRecipe
},
{
path: '/EditRecipe/:id',
name: 'EditRecipe',
component: EditRecipe
},
{
path: '/EditProfile',
name: 'EditProfile',
component: EditProfile
},
{
path: '/EditPassword',
name: 'EditPassword',
component: EditPassword
},
{
path: '/recommendation',
name: 'Recommend',
component: Recommend
},
{
path: '/recipes',
name: 'recipes',
component: Recipes
},
{
path: '/FavoriteRecipes',
name: 'FavoriteRecipes',
component: FavoriteRecipes
},
{
path: '/MyRecipes',
name: 'MyRecipes',
component: MyRecipes
},
{
path: '*',
name: 'NotFound',
component: NotFound
}
]
})