-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathapp.js
executable file
·98 lines (95 loc) · 2.6 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
/**
* @ngdoc overview
* @name app.js
* @description
* # ngmReportHubApp
*
* Main module of the application.
*/
angular
.module('ngmSbp', [])
.config([ '$routeProvider', '$compileProvider', function ( $routeProvider, $compileProvider ) {
// https://medium.com/swlh/improving-angular-performance-with-1-line-of-code-a1fb814a6476#.ufea9sjt1
$compileProvider.debugInfoEnabled( false )
// app routes with access rights
$routeProvider
// epr dashboard
.when( '/snapshot', {
redirectTo: '/snapshot/who/immap'
})
.when( '/snapshot/who/immap', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardWhoImmapCtrl',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
// drr snapshot
.when( '/snapshot/immap/', {
redirectTo: '/snapshot/immap/drr'
})
.when( '/snapshot/immap/drr', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardDrrSnapshot',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
// reporthub snapshot
.when( '/snapshot/who/', {
redirectTo: '/snapshot/who/reporthub'
})
.when( '/snapshot/who/reporthub', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardReporthubSnapshot',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
// cdc monthly reports
.when( '/snapshot/who/cdc/', {
redirectTo: '/snapshot/who/cdc/report/2017/10'
})
.when( '/snapshot/who/cdc/report/2017/10', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardWhoCdc201710Ctrl',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
.when( '/snapshot/who/cdc/report/2017/11', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardWhoCdc201711Ctrl',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
.when( '/snapshot/who/cdc/report/2017/12', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardWhoCdc201712Ctrl',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
})
.when( '/snapshot/who/cdc/report/2018/01', {
templateUrl: '/views/app/dashboard.html',
controller: 'DashboardWhoCdc201801Ctrl',
resolve: {
access: [ 'ngmAuth', function(ngmAuth) {
return ngmAuth.grantPublicAccess();
}],
}
});
}]);