2018-01-08 12:44:48 +01:00
|
|
|
import { InvitationAcceptedComponent } from './invitation-accepted/invitation-accepted.component';
|
2017-12-19 09:38:47 +01:00
|
|
|
import { UnauthorizedComponent } from './unauthorized/unauthorized.component';
|
2017-12-20 09:17:13 +01:00
|
|
|
import { NgModule } from '@angular/core';
|
2017-09-26 17:16:04 +02:00
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
2017-12-20 09:17:13 +01:00
|
|
|
import { HomepageComponent } from './homepage/homepage.component';
|
2017-09-26 17:16:04 +02:00
|
|
|
import { AuthGuard } from './guards/auth.guard';
|
2018-01-10 17:05:23 +01:00
|
|
|
import { LoginComponent } from './user-management/login/login.component';
|
2017-09-26 17:16:04 +02:00
|
|
|
|
|
|
|
const appRoutes: Routes = [
|
2018-01-30 10:35:26 +01:00
|
|
|
{ path: 'datasets', loadChildren: './datasets/dataset.module#DatasetModule' ,canActivate: [AuthGuard]},
|
|
|
|
{ path: 'projects', loadChildren: './projects/projects.module#ProjectsModule',canActivate: [AuthGuard] },
|
|
|
|
{ path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule',canActivate: [AuthGuard] },
|
2017-12-20 09:17:13 +01:00
|
|
|
{ path: 'welcome', component: HomepageComponent, canActivate: [AuthGuard] },
|
|
|
|
{ path: '', redirectTo: '/welcome', pathMatch: 'full' },
|
2018-01-30 10:35:26 +01:00
|
|
|
{ path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' }
|
2017-11-24 09:39:24 +01:00
|
|
|
|
2017-09-26 17:16:04 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
RouterModule.forRoot(
|
2017-10-10 16:10:00 +02:00
|
|
|
appRoutes
|
2017-12-20 09:17:13 +01:00
|
|
|
, {
|
2017-12-05 17:56:21 +01:00
|
|
|
useHash: false
|
2017-12-20 09:17:13 +01:00
|
|
|
}
|
2017-10-10 16:10:00 +02:00
|
|
|
)
|
2017-09-26 17:16:04 +02:00
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
RouterModule
|
|
|
|
],
|
|
|
|
providers: [
|
2018-01-30 10:35:26 +01:00
|
|
|
AuthGuard
|
2017-09-26 17:16:04 +02:00
|
|
|
]
|
|
|
|
})
|
2017-11-01 18:18:27 +01:00
|
|
|
export class AppRoutingModule { }
|
|
|
|
|