argos/dmp-admin/src/app/routes.ts

67 lines
1.9 KiB
TypeScript
Raw Normal View History

import { FormComponent } from './dataset-profile-form/form/form.component';
2017-10-16 17:05:25 +02:00
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';
2017-10-27 09:48:33 +02:00
import { DatasetprofileEditorComponent } from './managers/datasetprofile-editor/datasetprofile-editor.component';
2017-10-16 17:05:25 +02:00
import { MainWindowComponent } from './main-window/main-window.component';
import { NgModule } from '@angular/core';
import { AuthGuard } from './guards/auth.guard';
2017-10-16 17:05:25 +02:00
// Route Configuration
const routes: Routes = [
2017-10-16 17:05:25 +02:00
{
path: '',
redirectTo: 'app-root',
pathMatch: 'full'
},
{
path: 'datasets',
component: DatasetsViewerComponent,
canActivate: [AuthGuard]
2017-10-16 17:05:25 +02:00
},
2017-10-27 09:48:33 +02:00
{
path: 'datasetprofiles',
component: DatasetprofileEditorComponent,
canActivate: [AuthGuard]
2017-10-18 10:29:22 +02:00
},
2017-10-16 17:05:25 +02:00
{
path: 'datasets/profile',
component: ProfileEditorComponent,
canActivate: [AuthGuard]
2017-10-16 17:05:25 +02:00
//,data: { title: 'a title' }
},
{
path: 'main',
component: MainWindowComponent,
canActivate: [AuthGuard]
},
2018-02-01 15:04:36 +01:00
{ path: 'form', loadChildren: './dataset-profile-form/dataset-profile.module#DatasetProfileModule', canActivate: [AuthGuard]},
{ path: 'user-management', loadChildren: './users/users.module#UsersModule', canActivate: [AuthGuard]}
2017-10-16 17:05:25 +02:00
];
@NgModule({
imports: [
RouterModule.forRoot(
routes
)
],
exports: [
RouterModule
],
providers: [
]
})
2017-10-16 17:05:25 +02:00
export class AppRouting { }
//export const AppRouting: ModuleWithProviders = RouterModule.forRoot(routes);