OpenSlides/client/src/app/site/assignments/assignments-routing.module.ts
2020-03-17 07:24:38 +01:00

20 lines
952 B
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AssignmentDetailComponent } from './components/assignment-detail/assignment-detail.component';
import { AssignmentListComponent } from './components/assignment-list/assignment-list.component';
import { AssignmentPollDetailComponent } from './components/assignment-poll-detail/assignment-poll-detail.component';
const routes: Routes = [
{ path: '', component: AssignmentListComponent, pathMatch: 'full' },
{ path: 'new', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_manage' } },
{ path: ':id', component: AssignmentDetailComponent, data: { basePerm: 'assignments.can_see' } },
{ path: 'polls', children: [{ path: ':id', component: AssignmentPollDetailComponent }] }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AssignmentsRoutingModule {}