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

65 lines
1.9 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';
import { HomepageComponent } from './homepage/homepage.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';
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
2017-11-16 15:16:09 +01:00
import { DmpDetailedComponent } from './viewers/dmp-detailed/dmp-detailed.component';
2017-11-22 13:25:01 +01:00
import { ProjectDetailedComponent } from './viewers/project-detailed/project-detailed.component';
2017-11-16 15:16:09 +01:00
2017-09-26 17:16:04 +02:00
const appRoutes: Routes = [
2017-11-24 09:39:24 +01:00
2017-12-06 09:58:50 +01:00
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
2017-11-15 16:11:35 +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},
2017-11-24 09:39:24 +01:00
{ path: 'dmps',
component: DmpComponent,
children: [
{
path: "dmp",
component: DmpDetailedComponent,
data: {
//breadcrumb: "Sign In"
}
},
{
path: "project",
component: ProjectDetailedComponent,
data: {
//breadcrumb: "Sign Up"
}
}
]
},
{ path: 'welcome', component: HomepageComponent},
2017-11-07 11:36:09 +01:00
{ path: '', redirectTo: '/login', pathMatch: 'full' },
2017-11-24 09:39:24 +01:00
{ path: '**', component: PageNotFoundComponent }
2017-09-26 17:16:04 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes
2017-11-07 16:06:17 +01:00
,{
2017-12-05 17:56:21 +01:00
useHash: false
2017-11-07 16:06:17 +01:00
//,enableTracing: true <-- debugging purposes only
}
)
2017-09-26 17:16:04 +02:00
],
exports: [
RouterModule
],
providers: [
]
})
2017-11-01 18:18:27 +01:00
export class AppRoutingModule { }