41 lines
2.0 KiB
TypeScript
41 lines
2.0 KiB
TypeScript
import { UnauthorizedComponent } from './unauthorized/unauthorized.component';
|
|
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 { LoginComponent } from './user-management/login/login.component';
|
|
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', canActivate: [AuthGuard] },
|
|
{ path: 'about', loadChildren: './about/about.module#AboutModule', canActivate: [AuthGuard] },
|
|
{ path: 'projects', loadChildren: './projects/projects.module#ProjectsModule', canActivate: [AuthGuard] },
|
|
{ path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule', canActivate: [AuthGuard] },
|
|
{ path: "dmp-profiles", loadChildren: './dmp-profiles/dmp-profile.module#DataManagamentPlanProfileModule', canActivate: [AuthGuard] },
|
|
{ path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard] },
|
|
{ path: 'home', component: HomepageComponent, canActivate: [AuthGuard] },
|
|
{ path: '', redirectTo: '/welcome', pathMatch: 'full' },
|
|
{ path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
|
|
{ path: "users", loadChildren: './users/users.module#UsersModule' },
|
|
{ path: "datasetsProfiles", loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule' },
|
|
{ path: "welcome", component: WelcomepageComponent },
|
|
{ path: "api/oauth/authorized/b2access", component: B2AccessLoginComponent }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(
|
|
appRoutes
|
|
, {
|
|
useHash: false
|
|
}
|
|
)
|
|
],
|
|
exports: [
|
|
RouterModule
|
|
]
|
|
})
|
|
export class AppRoutingModule { }
|
|
|