1
|
/**
|
2
|
* Created by stefania on 9/16/16.
|
3
|
*/
|
4
|
import { NgModule} from '@angular/core';
|
5
|
import { Routes, RouterModule} from '@angular/router';
|
6
|
import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard';
|
7
|
import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
|
8
|
import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRIGuard.guard';
|
9
|
|
10
|
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
11
|
|
12
|
import {CommunityErrorPageComponent} from './openaireLibrary/connect/communityGuard/communityErrorPage.component';
|
13
|
import {AdminErrorPageComponent} from './pages/error/errorPage.component';
|
14
|
|
15
|
const appRoutes: Routes = [
|
16
|
{
|
17
|
path: '',
|
18
|
loadChildren: './pages/wellcome/wellcome.module#WellcomeModule',
|
19
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
20
|
},
|
21
|
{
|
22
|
path: 'dashboard',
|
23
|
loadChildren: './pages/dashboard/dashboard.module#DashboardModule',
|
24
|
resolve: {envSpecific: EnvironmentSpecificResolver}
|
25
|
},
|
26
|
{
|
27
|
path: 'manage-user-notifications',
|
28
|
loadChildren: './pages/usernotifications/manage-user-notifications.module#ManageUserNotificationsModule',
|
29
|
resolve: {envSpecific: EnvironmentSpecificResolver}
|
30
|
},
|
31
|
{
|
32
|
path: 'personal',
|
33
|
loadChildren: './pages/curator/curator.module#CuratorModule',
|
34
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
35
|
},
|
36
|
{
|
37
|
path: 'organizations',
|
38
|
loadChildren: './pages/affiliations/affiliations.module#AffiliationsModule',
|
39
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
40
|
},
|
41
|
{
|
42
|
path: 'communities',
|
43
|
loadChildren: './pages/community/communities.module#CommunitiesModule',
|
44
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
45
|
},
|
46
|
{
|
47
|
path: 'community-edit-form',
|
48
|
loadChildren: './pages/community/community-edit-form/community-edit-form.module#CommunityEditFormModule',
|
49
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
50
|
},
|
51
|
{
|
52
|
path: 'manage-zenodo-communities',
|
53
|
loadChildren: './pages/zenodo-communities/zenodo-communities.module#ZenodoCommunitiesModule',
|
54
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
55
|
},
|
56
|
{
|
57
|
path: 'manage-subscribers',
|
58
|
loadChildren: './pages/subscribers/manage-subscribers.module#ManageSubscribersModule',
|
59
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
60
|
},
|
61
|
{
|
62
|
path: 'manage-subjects',
|
63
|
loadChildren: './pages/subjects/subjects-edit-form/subjects-edit-form.module#SubjectsEditFormModule',
|
64
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
65
|
},
|
66
|
{
|
67
|
path: 'entities',
|
68
|
loadChildren: './pages/entity/entities.module#EntitiesModule',
|
69
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
70
|
},
|
71
|
{
|
72
|
path: 'classes',
|
73
|
loadChildren: './pages/divId/divIds.module#DivIdsModule',
|
74
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
75
|
},
|
76
|
{
|
77
|
path: 'pages',
|
78
|
loadChildren: './pages/page/pages.module#PagesModule',
|
79
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
80
|
},
|
81
|
{
|
82
|
path: 'pageContents',
|
83
|
loadChildren: './pages/helpcontent/page-help-contents.module#PageHelpContentsModule',
|
84
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
85
|
},
|
86
|
{
|
87
|
path: 'pageContents/new',
|
88
|
loadChildren: './pages/helpcontent/new-page-help-content.module#NewPageHelpContentModule',
|
89
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
90
|
},
|
91
|
{
|
92
|
path: 'pageContents/edit',
|
93
|
loadChildren: './pages/helpcontent/edit-page-help-content.module#EditPageHelpContentModule',
|
94
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
95
|
},
|
96
|
{
|
97
|
path: 'classContents',
|
98
|
loadChildren: './pages/divhelpcontent/div-help-contents.module#DivHelpContentsModule',
|
99
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
100
|
},
|
101
|
{
|
102
|
path: 'classContents/new',
|
103
|
loadChildren: './pages/divhelpcontent/new-div-help-content.module#NewDivHelpContentModule',
|
104
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
105
|
},
|
106
|
{
|
107
|
path: 'classContents/edit',
|
108
|
loadChildren: './pages/divhelpcontent/edit-div-help-content.module#EditDivHelpContentModule',
|
109
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
110
|
},
|
111
|
{
|
112
|
path: 'htmlPageContent/edit',
|
113
|
loadChildren: './pages/htmlpagecontent/edit-html-page-content.module#EditHtmlPageContentModule',
|
114
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
115
|
},
|
116
|
{
|
117
|
path: 'claims',
|
118
|
loadChildren: './pages/claims/claims.module#ClaimsModule',
|
119
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
120
|
},
|
121
|
{
|
122
|
path: 'reload',
|
123
|
loadChildren: './reload/libReload.module#LibReloadModule',
|
124
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
125
|
},
|
126
|
{
|
127
|
path: 'user-info',
|
128
|
loadChildren: './login/libUser.module#LibUserModule',
|
129
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
130
|
},
|
131
|
{
|
132
|
path: 'stats',
|
133
|
loadChildren: './pages/stats/stats.module#StatsModule',
|
134
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
135
|
},
|
136
|
{
|
137
|
path: 'manage-projects',
|
138
|
loadChildren: './pages/community/projects/communityProjects.module#CommunityProjectsModule',
|
139
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
140
|
},
|
141
|
{
|
142
|
path: 'manage-content-providers',
|
143
|
loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule',
|
144
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
145
|
},
|
146
|
/*{
|
147
|
path: 'customize-layout',
|
148
|
loadChildren: './pages/customization/customization.module#CustomizationModule',
|
149
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
150
|
},*/
|
151
|
{
|
152
|
path: 'manage-content-providers/criteria',
|
153
|
loadChildren: './pages/community/content-providers/criteria/criteria.module#CriteriaModule',
|
154
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
155
|
},
|
156
|
{
|
157
|
path: 'mining',
|
158
|
loadChildren: './pages/mining/mining.module#MiningModule',
|
159
|
canLoad: [IsCommunity, ConnectAdminLoginGuard, ConnectRIGuard]
|
160
|
},
|
161
|
{
|
162
|
path: 'errorcommunity',
|
163
|
component: CommunityErrorPageComponent
|
164
|
},
|
165
|
{ path: '**',
|
166
|
pathMatch: 'full',
|
167
|
component: AdminErrorPageComponent
|
168
|
}
|
169
|
|
170
|
];
|
171
|
|
172
|
@NgModule({
|
173
|
imports: [ RouterModule.forRoot(appRoutes) ],
|
174
|
exports: [ RouterModule ]
|
175
|
})
|
176
|
export class AppRoutingModule {}
|