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

121 lines
2.3 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomepageComponent } from './homepage/homepage.component';
import { AuthGuard } from './shared/guards/auth.guard';
import { WelcomepageComponent } from './welcomepage/welcomepage.component';
import { B2AccessLoginComponent } from './user-management/login/b2access/b2access-login.component';
const appRoutes: Routes = [
{
path: 'datasets',
loadChildren: './datasets/dataset.module#DatasetModule',
data: {
breadcrumb: true
},
//canActivate: [AuthGuard]
},
{
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: {
},
}
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes
, {
useHash: false
}
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule { }