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

123 lines
2.6 KiB
TypeScript
Raw Normal View History

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';
2018-05-28 11:50:42 +02:00
import { AuthGuard } from './shared/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-06-27 12:29:21 +02:00
{
path: 'datasets',
loadChildren: './datasets/dataset.module#DatasetModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: 'about',
loadChildren: './about/about.module#AboutModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: 'projects',
loadChildren: './projects/projects.module#ProjectsModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: "dmps",
loadChildren: './dmps/dmps.module#DataManagementPlanModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: "dmp-profiles",
loadChildren: './dmp-profiles/dmp-profile.module#DataManagamentPlanProfileModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: 'form',
loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: 'home',
component: HomepageComponent,
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: false
2018-06-27 12:29:21 +02:00
},
canActivate: [AuthGuard]
},
{
path: '',
redirectTo: '/welcome',
data: {
2018-07-23 16:01:27 +02:00
breadcrumbs: false
2018-06-27 12:29:21 +02:00
},
pathMatch: 'full'
},
{
path: "unauthorized",
loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
},
{
path: "users",
loadChildren: './users/users.module#UsersModule'
},
{
path: "datasetsProfiles",
loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule',
data: {
2018-06-28 11:28:16 +02:00
breadcrumb: true
2018-06-27 12:29:21 +02:00
},
},
{
path: "welcome",
component: WelcomepageComponent,
data: {
2018-07-23 16:01:27 +02:00
breadcrumb: false
2018-06-27 12:29:21 +02:00
},
},
{
path: "api/oauth/authorized/b2access",
component: B2AccessLoginComponent,
data: {
},
}
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
]
})
2017-11-01 18:18:27 +01:00
export class AppRoutingModule { }