67 lines
1.9 KiB
TypeScript
67 lines
1.9 KiB
TypeScript
import { FormComponent } from './dataset-profile-form/form/form.component';
|
|
import { ModuleWithProviders } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { GooggleSignInComponent } from './login/googgle-sign-in/googgle-sign-in.component';
|
|
import { DatasetsViewerComponent } from './datasets-viewer/datasets-viewer.component';
|
|
import { ProfileEditorComponent } from './bootstrap/profile-editor/profile-editor.component';
|
|
import { DmpProfileEditorComponent } from './managers/dmp-profile-editor/dmp-profile-editor.component';
|
|
import { DatasetprofileEditorComponent } from './managers/datasetprofile-editor/datasetprofile-editor.component';
|
|
|
|
import { MainWindowComponent } from './main-window/main-window.component';
|
|
import { NgModule } from '@angular/core';
|
|
import { AuthGuard } from './guards/auth.guard';
|
|
|
|
|
|
|
|
// Route Configuration
|
|
const routes: Routes = [
|
|
|
|
{
|
|
path: '',
|
|
redirectTo: 'app-root',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'datasets',
|
|
component: DatasetsViewerComponent,
|
|
canActivate: [AuthGuard]
|
|
},
|
|
{
|
|
path: 'datasetprofiles',
|
|
component: DatasetprofileEditorComponent,
|
|
canActivate: [AuthGuard]
|
|
},
|
|
{
|
|
path: 'datasets/profile',
|
|
component: ProfileEditorComponent,
|
|
canActivate: [AuthGuard]
|
|
//,data: { title: 'a title' }
|
|
},
|
|
{
|
|
path: 'main',
|
|
component: MainWindowComponent,
|
|
canActivate: [AuthGuard]
|
|
},
|
|
{ path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard]},
|
|
{ path: 'user-management', loadChildren: './users/users.module#UsersModule', canActivate: [AuthGuard]}
|
|
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(
|
|
routes
|
|
)
|
|
],
|
|
exports: [
|
|
RouterModule
|
|
],
|
|
providers: [
|
|
|
|
]
|
|
})
|
|
|
|
export class AppRouting { }
|
|
//export const AppRouting: ModuleWithProviders = RouterModule.forRoot(routes);
|