1
|
import {NgModule} from '@angular/core';
|
2
|
import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
|
3
|
|
4
|
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
5
|
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
6
|
|
7
|
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
8
|
|
9
|
const routes: Routes = [
|
10
|
{
|
11
|
path: 'reload',
|
12
|
loadChildren: './reload/libReload.module#LibReloadModule',
|
13
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
14
|
data: {hasSidebar: false}
|
15
|
},
|
16
|
{
|
17
|
path: 'user-info',
|
18
|
loadChildren: './login/libUser.module#LibUserModule',
|
19
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
20
|
data: {hasSidebar: false, isFrontPage: true}
|
21
|
},
|
22
|
{
|
23
|
path: 'error',
|
24
|
component: OpenaireErrorPageComponent,
|
25
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
26
|
data: {hasSidebar: false, isFrontPage: true}
|
27
|
},
|
28
|
{
|
29
|
path: 'admin',
|
30
|
loadChildren: './manageStakeholders/manageStakeholders.module#ManageStakeholdersModule',
|
31
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
32
|
data: {hasAdminMenu: true}
|
33
|
},
|
34
|
{
|
35
|
path: 'admin/:stakeholder/users',
|
36
|
loadChildren: './users/users.module#UsersModule',
|
37
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
38
|
data: {hasAdminMenu: true},
|
39
|
pathMatch: 'full'
|
40
|
},
|
41
|
{
|
42
|
path: 'admin/:stakeholder',
|
43
|
loadChildren: './general/general.module#GeneralModule',
|
44
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
45
|
data: {hasAdminMenu: true},
|
46
|
pathMatch: 'full'
|
47
|
},
|
48
|
{
|
49
|
path: 'admin/:stakeholder/indicators/:topic',
|
50
|
loadChildren: './topic/topic.module#TopicModule',
|
51
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
52
|
pathMatch: 'full'
|
53
|
},
|
54
|
{
|
55
|
path: 'admin/:stakeholder/indicators',
|
56
|
loadChildren: './topic/topic.module#TopicModule',
|
57
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
58
|
pathMatch: 'full'
|
59
|
},
|
60
|
|
61
|
/* Library paths*/
|
62
|
{
|
63
|
path: 'portals',
|
64
|
loadChildren: './portals/portals.module#PortalsModule',
|
65
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
66
|
data: {hasAdminMenu: true}
|
67
|
},
|
68
|
{
|
69
|
path: 'entities',
|
70
|
loadChildren: './entities/entities.module#MonitorEntitiesModule',
|
71
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
72
|
data: {hasAdminMenu: true}
|
73
|
},
|
74
|
{
|
75
|
path: 'classes',
|
76
|
loadChildren: './classes/classes.module#ClassesModule',
|
77
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
78
|
data: {hasAdminMenu: true}
|
79
|
},
|
80
|
{
|
81
|
path: 'classContents',
|
82
|
loadChildren: './classHelpTexts/div-help-contents.module#MonitorDivHelpContentsModule',
|
83
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
84
|
data: {hasAdminMenu: true}
|
85
|
},
|
86
|
{
|
87
|
path: 'classContents/new',
|
88
|
loadChildren: './classHelpTexts/new-div-help-content.module#MonitorNewDivHelpContentModule',
|
89
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
90
|
data: {hasAdminMenu: true}
|
91
|
},
|
92
|
{
|
93
|
path: 'classContents/edit',
|
94
|
loadChildren: './classHelpTexts/edit-div-help-content.module#MonitorEditDivHelpContentModule',
|
95
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
96
|
data: {hasAdminMenu: true}
|
97
|
},
|
98
|
{
|
99
|
path: 'helptexts',
|
100
|
loadChildren: './helpTexts/page-help-contents.module#MonitorPageHelpContentsModule',
|
101
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
102
|
data: {hasAdminMenu: true}
|
103
|
},
|
104
|
{
|
105
|
path: 'helptexts/new',
|
106
|
loadChildren: './helpTexts/new-page-help-content.module#MonitorNewPageHelpContentModule',
|
107
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
108
|
data: {hasAdminMenu: true}
|
109
|
},
|
110
|
{
|
111
|
path: 'helptexts/edit',
|
112
|
loadChildren: './helpTexts/edit-page-help-content.module#MonitorEditPageHelpContentModule',
|
113
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
114
|
data: {hasAdminMenu: true}
|
115
|
},
|
116
|
{
|
117
|
path: 'pages',
|
118
|
loadChildren: './pages/pages.module#MonitorPagesModule',
|
119
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
120
|
data: {hasAdminMenu: true}
|
121
|
},
|
122
|
{
|
123
|
path: 'pageContents',
|
124
|
loadChildren: './helpTexts/page-help-contents.module#MonitorPageHelpContentsModule',
|
125
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
126
|
data: {hasAdminMenu: true}
|
127
|
},
|
128
|
{
|
129
|
path: 'pageContents/new',
|
130
|
loadChildren: './helpTexts/new-page-help-content.module#MonitorNewPageHelpContentModule',
|
131
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
132
|
data: {hasAdminMenu: true}
|
133
|
},
|
134
|
{
|
135
|
path: 'pageContents/edit',
|
136
|
loadChildren: './helpTexts/edit-page-help-content.module#MonitorEditPageHelpContentModule',
|
137
|
resolve: { envSpecific: EnvironmentSpecificResolver },
|
138
|
data: {hasAdminMenu: true}
|
139
|
},
|
140
|
//
|
141
|
// {
|
142
|
// path: 'htmlPageContent/edit',
|
143
|
// loadChildren: './pages/htmlpagecontent/edit-html-page-content.module#EditHtmlPageContentModule',
|
144
|
// resolve: { envSpecific: EnvironmentSpecificResolver },
|
145
|
// data: {hasAdminMenu: true}
|
146
|
// },
|
147
|
{ path: 'theme', loadChildren: './openaireLibrary/utils/theme/theme.module#ThemeModule'},
|
148
|
{
|
149
|
path: '',
|
150
|
loadChildren: './monitor/monitor.module#MonitorModule',
|
151
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
152
|
data: {hasMiniMenu: true, isFrontPage: true}
|
153
|
},
|
154
|
{
|
155
|
path: '**',
|
156
|
pathMatch: 'full',
|
157
|
component: OpenaireErrorPageComponent,
|
158
|
resolve: {envSpecific: EnvironmentSpecificResolver},
|
159
|
data: {hasSidebar: false, hasAdminMenu: false, isFrontPage: true}
|
160
|
}
|
161
|
];
|
162
|
|
163
|
@NgModule({
|
164
|
imports: [RouterModule.forRoot(routes, {
|
165
|
preloadingStrategy: PreloadAllModules,
|
166
|
scrollPositionRestoration: "top",
|
167
|
onSameUrlNavigation: "reload"
|
168
|
})],
|
169
|
exports: [RouterModule],
|
170
|
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
171
|
})
|
172
|
export class AppRoutingModule {
|
173
|
}
|