55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { PageNotFoundComponent } from './not-found.component';
|
|
import { HomepageComponent } from './homepage/homepage.component';
|
|
import { DynamicFormComponent } from './form/dynamic-form.component';
|
|
import { AuthGuard } from './guards/auth.guard';
|
|
import { ProjectsComponent } from './projects/projects.component';
|
|
import { DatasetsComponent } from './datasets/dataset.component';
|
|
import { DmpComponent } from './dmps/dmp.component';
|
|
import { AppComponent } from './app.component';
|
|
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
|
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
|
import { DmpDetailedComponent } from './viewers/dmp-detailed/dmp-detailed.component';
|
|
|
|
|
|
const appRoutes: Routes = [
|
|
//{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
|
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
|
{ path: 'dataset', component: DatasetsComponent },
|
|
{ path: 'login', component: MainSignInComponent},
|
|
{ path: 'projects', component: ProjectsComponent},
|
|
{ path: 'dmps', component: DmpComponent},
|
|
{ path: 'dmp', component: DmpDetailedComponent },
|
|
{ path: 'workspace', component: UserWorkspaceComponent},
|
|
{ path: 'welcome', component: HomepageComponent},
|
|
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
|
{ path: '**', component: PageNotFoundComponent },
|
|
/*
|
|
{
|
|
path: '',
|
|
redirectTo: 'app-root',
|
|
pathMatch: 'full'
|
|
}
|
|
*/
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(
|
|
appRoutes
|
|
,{
|
|
useHash: true
|
|
//,enableTracing: true <-- debugging purposes only
|
|
}
|
|
)
|
|
],
|
|
exports: [
|
|
RouterModule
|
|
],
|
|
providers: [
|
|
]
|
|
})
|
|
export class AppRoutingModule { }
|
|
|