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

114 lines
2.1 KiB
TypeScript
Raw Normal View History

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';
2018-05-28 11:50:42 +02:00
import { AuthGuard } from './shared/guards/auth.guard';
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-07-24 09:58:55 +02:00
{
path: 'datasets',
loadChildren: './datasets/dataset.module#DatasetModule',
data: {
breadcrumb: true
},
2018-08-30 13:09:36 +02:00
//canActivate: [AuthGuard]
2018-07-24 09:58:55 +02:00
},
{
path: 'about',
loadChildren: './about/about.module#AboutModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
path: 'projects',
loadChildren: './projects/projects.module#ProjectsModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
2018-10-05 17:00:54 +02:00
path: 'dmps',
2018-07-24 09:58:55 +02:00
loadChildren: './dmps/dmps.module#DataManagementPlanModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
2018-10-05 17:00:54 +02:00
path: 'dmp-profiles',
2018-07-24 09:58:55 +02:00
loadChildren: './dmp-profiles/dmp-profile.module#DataManagamentPlanProfileModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
path: 'dataset-profile',
2018-07-24 09:58:55 +02:00
loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
path: 'home',
component: HomepageComponent,
data: {
breadcrumb: false
},
canActivate: [AuthGuard]
},
{
path: '',
redirectTo: '/welcome',
data: {
breadcrumbs: false
},
pathMatch: 'full'
},
{
2018-10-05 17:00:54 +02:00
path: 'unauthorized',
2018-07-24 09:58:55 +02:00
loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule',
data: {
breadcrumb: true
},
},
{
2018-10-05 17:00:54 +02:00
path: 'users',
2018-07-24 09:58:55 +02:00
loadChildren: './users/users.module#UsersModule'
},
{
2018-10-05 17:00:54 +02:00
path: 'welcome',
2018-07-24 09:58:55 +02:00
component: WelcomepageComponent,
data: {
breadcrumb: false
},
},
{
2018-10-05 17:00:54 +02:00
path: 'api/oauth/authorized/b2access',
2018-07-24 09:58:55 +02:00
component: B2AccessLoginComponent,
data: {
},
}
2017-09-26 17:16:04 +02:00
];
@NgModule({
2018-07-24 09:58:55 +02:00
imports: [
RouterModule.forRoot(
appRoutes
, {
useHash: false
}
)
],
exports: [
RouterModule
]
2017-09-26 17:16:04 +02:00
})
2017-11-01 18:18:27 +01:00
export class AppRoutingModule { }