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: 'community-layout',
|
53
|
loadChildren: './pages/community/layout/community-layout.module#CommunityLayoutModule',
|
54
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
55
|
},
|
56
|
{
|
57
|
path: 'manage-zenodo-communities',
|
58
|
loadChildren: './pages/zenodo-communities/zenodo-communities.module#ZenodoCommunitiesModule',
|
59
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
60
|
},
|
61
|
{
|
62
|
path: 'manage-subscribers',
|
63
|
loadChildren: './pages/subscribers/manage-subscribers.module#ManageSubscribersModule',
|
64
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
65
|
},
|
66
|
{
|
67
|
path: 'manage-subjects',
|
68
|
loadChildren: './pages/subjects/subjects-edit-form/subjects-edit-form.module#SubjectsEditFormModule',
|
69
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
70
|
},
|
71
|
{
|
72
|
path: 'entities',
|
73
|
loadChildren: './pages/entity/entities.module#EntitiesModule',
|
74
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
75
|
},
|
76
|
{
|
77
|
path: 'classes',
|
78
|
loadChildren: './pages/divId/divIds.module#DivIdsModule',
|
79
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
80
|
},
|
81
|
{
|
82
|
path: 'pages',
|
83
|
loadChildren: './pages/page/pages.module#PagesModule',
|
84
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
85
|
},
|
86
|
{
|
87
|
path: 'pageContents',
|
88
|
loadChildren: './pages/helpcontent/page-help-contents.module#PageHelpContentsModule',
|
89
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
90
|
},
|
91
|
{
|
92
|
path: 'pageContents/new',
|
93
|
loadChildren: './pages/helpcontent/new-page-help-content.module#NewPageHelpContentModule',
|
94
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
95
|
},
|
96
|
{
|
97
|
path: 'pageContents/edit',
|
98
|
loadChildren: './pages/helpcontent/edit-page-help-content.module#EditPageHelpContentModule',
|
99
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
100
|
},
|
101
|
|
102
|
{
|
103
|
path: 'classContents',
|
104
|
loadChildren: './pages/divhelpcontent/div-help-contents.module#DivHelpContentsModule',
|
105
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
106
|
},
|
107
|
{
|
108
|
path: 'classContents/new',
|
109
|
loadChildren: './pages/divhelpcontent/new-div-help-content.module#NewDivHelpContentModule',
|
110
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
111
|
},
|
112
|
{
|
113
|
path: 'classContents/edit',
|
114
|
loadChildren: './pages/divhelpcontent/edit-div-help-content.module#EditDivHelpContentModule',
|
115
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
116
|
},
|
117
|
{
|
118
|
path: 'htmlPageContent/edit',
|
119
|
loadChildren: './pages/htmlpagecontent/edit-html-page-content.module#EditHtmlPageContentModule',
|
120
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
121
|
},
|
122
|
{
|
123
|
path: 'claims',
|
124
|
loadChildren: './pages/claims/claims.module#ClaimsModule',
|
125
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
126
|
},
|
127
|
{
|
128
|
path: 'reload',
|
129
|
loadChildren: './reload/libReload.module#LibReloadModule',
|
130
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
131
|
},
|
132
|
{
|
133
|
path: 'user-info',
|
134
|
loadChildren: './login/libUser.module#LibUserModule',
|
135
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
136
|
},
|
137
|
{
|
138
|
path: 'stats',
|
139
|
loadChildren: './pages/stats/stats.module#StatsModule',
|
140
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
141
|
},
|
142
|
{
|
143
|
path: 'manage-projects',
|
144
|
loadChildren: './pages/community/projects/communityProjects.module#CommunityProjectsModule',
|
145
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
146
|
},
|
147
|
{
|
148
|
path: 'manage-content-providers',
|
149
|
loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule',
|
150
|
resolve: { envSpecific: EnvironmentSpecificResolver }
|
151
|
},
|
152
|
{
|
153
|
path: 'mining',
|
154
|
loadChildren: './pages/mining/mining.module#MiningModule',
|
155
|
canLoad: [IsCommunity, ConnectAdminLoginGuard, ConnectRIGuard]
|
156
|
},
|
157
|
{
|
158
|
path: 'errorcommunity',
|
159
|
component: CommunityErrorPageComponent
|
160
|
},
|
161
|
{ path: '**',
|
162
|
pathMatch: 'full',
|
163
|
component: AdminErrorPageComponent
|
164
|
}
|
165
|
|
166
|
];
|
167
|
|
168
|
@NgModule({
|
169
|
imports: [ RouterModule.forRoot(appRoutes) ],
|
170
|
exports: [ RouterModule ]
|
171
|
})
|
172
|
export class AppRoutingModule {}
|