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

43 lines
1.3 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 { 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-09-26 17:16:04 +02:00
const appRoutes: Routes = [
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
2017-11-01 18:18:27 +01:00
{ path: 'login-page', component: MainSignInComponent},
{ path: 'projects', component: ProjectsComponent},
{ path: 'dmps', component: DmpComponent},
2017-09-26 17:16:04 +02:00
{ path: '', redirectTo: '/login-page', pathMatch: 'full' },
2017-11-01 18:18:27 +01:00
{ path: '**', component: PageNotFoundComponent },
{
path: '',
redirectTo: 'app-root',
pathMatch: 'full'
}
2017-09-26 17:16:04 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes
// { 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 { }