-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
126 lines (118 loc) · 4.33 KB
/
app.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
var app = angular.module('appVfarm', ['ui.router', 'ui.bootstrap', 'ui.select2', 'angularUtils.directives.dirPagination']);
app.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/login');
$stateProvider
.state('home', {
url: '/home',
templateUrl: 'home.html'
})
.state('login', {
url: '/login',
views: {
content: {
templateUrl: 'app/views/vfarmlogin.html',
controller: 'signinCtrl'
},
footer: {
templateUrl: 'app/views/footer.html'
}
}
})
.state('products', {
url: '/products',
views: {
nav: {
templateUrl: 'app/views/navigation.html',
controller: 'navigationCtrl'
},
content: {
templateUrl: 'app/views/products.html',
controller: 'productsCtrl'
},
footer: {
templateUrl: 'app/views/footer.html'
}
},
params: {obj: "Dairy"}
})
.state('adminpanel', {
url: '/adminpanel',
views: {
content: {
templateUrl: 'app/views/adminpanel.html',
controller: 'adminpanel'
},
footer: {
templateUrl: 'app/views/footer.html'
}
}
})
.state('myorders', {
url: '/myorders',
views: {
nav: {
templateUrl: 'app/views/navigation.html',
controller: 'navigationCtrl'
},
content: {
templateUrl: 'app/views/myorders.html',
controller: 'myordersCtrl'
},
footer: {
templateUrl: 'app/views/footer.html'
}
}
})
.state('myprofile', {
url: '/myprofile',
views: {
nav: {
templateUrl: 'app/views/navigation.html',
controller: 'navigationCtrl'
},
content: {
templateUrl: 'app/views/myprofile.html',
controller: 'myprofileCtrl'
},
footer: {
templateUrl: 'app/views/footer.html'
}
}
})
.state('wallet', {
url: '/wallet',
views: {
nav: {
templateUrl: 'app/views/navigation.html',
controller: 'navigationCtrl'
},
content: {
templateUrl: 'app/views/wallet.html',
controller: 'walletCtrl'
},
footer: {
templateUrl: 'app/views/footer.html'
}
}
})
// // nested list with custom controller
// .state('home.list', {
// url: '/list',
// templateUrl: 'partial-home-list.html',
// controller: function ($scope) {
// $scope.dogs = ['Bernese', 'Husky', 'Goldendoodle'];
// }
// })
//
// // nested list with just some random string data
// .state('home.paragraph', {
// url: '/paragraph',
// template: 'I could sure use a drink right now.'
// })
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('about', {
// we'll get to this in a bit
});
// }).run(function ($state) {
// $state.go('signin'); //make a transition to signin state when app starts
});