18 lines
552 B
TypeScript
18 lines
552 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { RouterModule, Routes } from '@angular/router';
|
||
|
|
||
|
import { ConsultationComponent } from './consultation.component';
|
||
|
|
||
|
const routes: Routes = [
|
||
|
{ path: '', redirectTo: 'poll', pathMatch: 'full' },
|
||
|
{ path: 'poll', component: ConsultationComponent },
|
||
|
{ path: ':slug', redirectTo: 'poll/:slug', pathMatch: 'full' },
|
||
|
{ path: 'poll/:slug', component: ConsultationComponent },
|
||
|
];
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [RouterModule.forChild(routes)],
|
||
|
exports: [RouterModule],
|
||
|
})
|
||
|
export class ConsultationRoutingModule {}
|