argos/dmp-frontend/src/app/app-routing.module.ts

45 lines
2.1 KiB
TypeScript
Raw Normal View History

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';
2018-05-14 08:44:35 +02:00
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
2018-02-23 11:36:51 +01:00
import { B2AccessLoginComponent } from './user-management/login/b2access/b2access-login.component';
2017-09-26 17:16:04 +02:00
const appRoutes: Routes = [
2018-02-09 16:54:41 +01:00
{ path: 'datasets', loadChildren: './datasets/dataset.module#DatasetModule', canActivate: [AuthGuard] },
2018-03-28 15:24:47 +02:00
{ path: 'about', loadChildren: './about/about.module#AboutModule', canActivate: [AuthGuard] },
2018-02-09 16:54:41 +01:00
{ path: 'projects', loadChildren: './projects/projects.module#ProjectsModule', canActivate: [AuthGuard] },
{ path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule', canActivate: [AuthGuard] },
2018-03-28 15:24:47 +02:00
{ path: "dmp-profiles", loadChildren: './dmp-profiles/dmp-profile.module#DataManagamentPlanProfileModule', canActivate: [AuthGuard] },
2018-02-09 16:54:41 +01:00
{ path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard] },
2018-02-02 15:07:25 +01:00
{ path: 'home', component: HomepageComponent, canActivate: [AuthGuard] },
2017-12-20 09:17:13 +01:00
{ path: '', redirectTo: '/welcome', pathMatch: 'full' },
2018-02-09 16:54:41 +01:00
{ path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
2018-02-02 15:07:25 +01:00
{ path: "users", loadChildren: './users/users.module#UsersModule' },
{ path: "datasetsProfiles", loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule' },
2018-02-23 11:36:51 +01:00
{ path: "welcome", component: WelcomepageComponent },
{ path: "api/oauth/authorized/b2access", component: B2AccessLoginComponent }
2017-09-26 17:16:04 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(
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-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 { }