framadate-responsive/src/app/features/administration/administration-routing.module.ts

36 lines
1.5 KiB
TypeScript
Raw Normal View History

2020-04-22 12:56:18 +02:00
import { NgModule } from '@angular/core';
2020-05-01 19:10:17 +02:00
import { RouterModule, Routes } from '@angular/router';
2020-04-22 12:56:18 +02:00
import { AdministrationComponent } from './administration.component';
2020-05-01 19:10:17 +02:00
import { EditConfigurationComponent } from './edit-configuration/edit-configuration.component';
import { EditDescriptionComponent } from './edit-description/edit-description.component';
import { EditOptionsComponent } from './edit-options/edit-options.component';
import { PollEditComponent } from './poll-edit/poll-edit.component';
import { ProfileComponent } from './profile/profile.component';
2020-04-22 12:56:18 +02:00
2020-05-01 19:10:17 +02:00
const routes: Routes = [
{ path: '', redirectTo: 'edit', pathMatch: 'full' },
{
path: 'edit',
component: AdministrationComponent,
children: [
{ path: '', redirectTo: 'description', pathMatch: 'full' },
{ path: 'description', component: EditDescriptionComponent },
{ path: 'description/:slug', component: EditDescriptionComponent },
{ path: 'options', component: EditOptionsComponent },
{ path: 'options/:slug', component: EditOptionsComponent },
{ path: 'configuration', component: EditConfigurationComponent },
{ path: 'configuration/:slug', component: EditConfigurationComponent },
{ path: 'preview', component: PollEditComponent },
{ path: 'preview/:slug', component: PollEditComponent },
],
},
{ path: 'profile', component: ProfileComponent },
];
2020-04-22 12:56:18 +02:00
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AdministrationRoutingModule {}