This repository was archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathconfig.route.js
More file actions
110 lines (103 loc) · 2.68 KB
/
config.route.js
File metadata and controls
110 lines (103 loc) · 2.68 KB
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
(function () {
'use strict';
var app = angular.module('app');
// get all the routes
app.constant('routes', getRoutes());
// config routes & their resolvers
app.config(['$routeProvider', 'routes', routeConfigurator]);
function routeConfigurator($routeProvider, routes) {
routes.forEach(function (route) {
$routeProvider.when(route.url, route.config);
});
$routeProvider.otherwise({ redirectTo: '/' });
}
// build the routes
function getRoutes() {
return [
{
url: '/',
config: {
templateUrl: 'app/dashboard/dashboard.html',
title: 'dashboard',
settings: {
nav: 0,
content: 'dashboard',
quickLaunchEnabled: false
}
}
},
{
url: '/LearningPaths',
config: {
templateUrl: 'app/learningPath/learningPaths.html',
title: 'learning paths',
settings: {
nav: 1,
content: 'Learning Paths',
quickLaunchEnabled: true
}
}
},
{
url: '/LearningPaths/:id',
config: {
templateUrl: 'app/learningPath/learningPathsDetail.html',
title: 'learning paths',
settings: {
nav: 1.1,
content: 'Learning Path Detail',
quickLaunchEnabled: false
}
}
},
{
url: '/LearningPaths/:learningPathId/Items',
config: {
templateUrl: 'app/learningItem/learningItems.html',
title: 'learning paths items',
settings: {
nav: 1.2,
content: 'Learning Path Items',
quickLaunchEnabled: false
}
}
},
{
url: '/LearningPaths/:learningPathId/submitreview',
config: {
templateUrl: 'app/workflowform/initform.html',
title: 'workflow initialization form',
settings: {
nav: 1.3,
content: 'Submit Learning Path for Review',
quickLaunchEnabled: false
}
}
},
{
url: '/LearningItems',
config: {
templateUrl: 'app/learningItem/learningItems.html',
title: 'learning items',
settings: {
nav: 2,
content: 'Learning Items',
quickLaunchEnabled: true
}
}
},
{
url: '/LearningItems/:id',
config: {
templateUrl: 'app/learningItem/learningItemsDetail.html',
title: 'learning items',
settings: {
nav: 2.1,
content: 'Learning Item Detail',
quickLaunchEnabled: false
}
}
}
];
}
})();