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

41 lines
1.7 KiB
TypeScript
Raw Normal View History

2018-01-08 12:44:48 +01:00
import { InvitationAcceptedComponent } from './invitation-accepted/invitation-accepted.component';
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';
2017-09-26 17:16:04 +02:00
import { AuthGuard } from './guards/auth.guard';
2018-01-10 17:05:23 +01:00
import { LoginComponent } from './user-management/login/login.component';
2018-02-02 15:07:25 +01:00
import { WelcomepageComponent } from '@app/welcomepage/welcomepage.component';
2017-09-26 17:16:04 +02:00
const appRoutes: Routes = [
2018-02-09 16:54:41 +01:00
{ path: 'datasets', loadChildren: './datasets/dataset.module#DatasetModule', canActivate: [AuthGuard] },
{ path: 'projects', loadChildren: './projects/projects.module#ProjectsModule', canActivate: [AuthGuard] },
{ path: "dmps", loadChildren: './dmps/dmps.module#DataManagementPlanModule', canActivate: [AuthGuard] },
{ path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard] },
2018-02-02 15:07:25 +01:00
{ path: 'home', component: HomepageComponent, canActivate: [AuthGuard] },
2017-12-20 09:17:13 +01:00
{ path: '', redirectTo: '/welcome', pathMatch: 'full' },
2018-02-09 16:54:41 +01:00
{ path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
2018-02-02 15:07:25 +01:00
{ path: "users", loadChildren: './users/users.module#UsersModule' },
{ path: "datasetsProfiles", loadChildren: './datasets-admin-listing/dataset-admin.module#DatasetAdminModule' },
2018-02-09 16:54:41 +01:00
{ path: "welcome", component: WelcomepageComponent }
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
],
providers: [
2018-01-30 10:35:26 +01:00
AuthGuard
2017-09-26 17:16:04 +02:00
]
})
2017-11-01 18:18:27 +01:00
export class AppRoutingModule { }