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

121 lines
2.3 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]
},
{
path: "dmps",
loadChildren: './dmps/dmps.module#DataManagementPlanModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
path: "dmp-profiles",
loadChildren: './dmp-profiles/dmp-profile.module#DataManagamentPlanProfileModule',
data: {
breadcrumb: true
},
canActivate: [AuthGuard]
},
{
path: 'form',
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'
},
{
path: "unauthorized",
loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule',
data: {
breadcrumb: true
},
},
{
path: "users",
loadChildren: './users/users.module#UsersModule'
},
{
path: "datasetsProfiles",
loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule',
data: {
breadcrumb: true
},
},
{
path: "welcome",
component: WelcomepageComponent,
data: {
breadcrumb: false
},
},
{
path: "api/oauth/authorized/b2access",
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 { }