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-06-16 18:40:48 +02:00
|
|
|
import { UserPollsComponent } from './user-polls/user-polls.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
|
2020-05-01 19:10:17 +02:00
|
|
|
const routes: Routes = [
|
2020-06-16 18:40:48 +02:00
|
|
|
{ path: '', redirectTo: 'poll', pathMatch: 'full' },
|
|
|
|
{ path: ':slug', redirectTo: 'poll/:slug', pathMatch: 'full' },
|
|
|
|
{ path: 'poll', component: AdministrationComponent },
|
|
|
|
{ path: 'poll/:slug', component: AdministrationComponent },
|
|
|
|
{ path: 'user-polls', component: UserPollsComponent },
|
2020-05-01 19:10:17 +02:00
|
|
|
];
|
2020-04-22 12:56:18 +02:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
exports: [RouterModule],
|
|
|
|
})
|
|
|
|
export class AdministrationRoutingModule {}
|