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

54 lines
1.8 KiB
TypeScript
Raw Normal View History

2017-09-26 17:16:04 +02:00
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PageNotFoundComponent } from './not-found.component';
2017-11-06 14:11:03 +01:00
import { EmptyComponent } from './empty.component';
2017-09-26 17:16:04 +02:00
import { DynamicFormComponent } from './form/dynamic-form.component';
import { AuthGuard } from './guards/auth.guard';
import { ProjectsComponent } from './projects/projects.component';
2017-10-18 18:30:39 +02:00
import { DatasetsComponent } from './datasets/dataset.component';
2017-11-01 18:18:27 +01:00
import { DmpComponent } from './dmps/dmp.component';
import { AppComponent } from './app.component';
2017-11-06 14:11:03 +01:00
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
2017-11-01 18:18:27 +01:00
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
2017-11-14 15:06:00 +01:00
import { BreadcrumbService } from './services/breadcrumb.service';
2017-09-26 17:16:04 +02:00
const appRoutes: Routes = [
2017-11-14 10:36:21 +01:00
//{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
2017-11-14 10:36:21 +01:00
//{ path: 'dataset', component: DatasetsComponent },
2017-11-02 10:11:29 +01:00
{ path: 'login', component: MainSignInComponent},
2017-11-13 18:13:49 +01:00
{ path: 'projects', component: ProjectsComponent},
{ path: 'dmps', component: DmpComponent},
2017-11-06 14:11:03 +01:00
{ path: 'workspace', component: UserWorkspaceComponent},
2017-11-13 18:13:49 +01:00
{ path: 'welcome', component: EmptyComponent},
2017-11-07 11:36:09 +01:00
{ path: '', redirectTo: '/login', pathMatch: 'full' },
2017-11-01 18:18:27 +01:00
{ path: '**', component: PageNotFoundComponent },
2017-11-06 14:11:03 +01:00
/*
2017-11-01 18:18:27 +01:00
{
path: '',
redirectTo: 'app-root',
pathMatch: 'full'
}
2017-11-06 14:11:03 +01:00
*/
2017-09-26 17:16:04 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes
2017-11-07 16:06:17 +01:00
,{
useHash: true
//,enableTracing: true <-- debugging purposes only
}
)
2017-09-26 17:16:04 +02:00
],
exports: [
RouterModule
],
providers: [
2017-11-14 15:06:00 +01:00
BreadcrumbService
2017-09-26 17:16:04 +02:00
]
})
2017-11-01 18:18:27 +01:00
export class AppRoutingModule { }