diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 1d63c142089aaaebecc4857211c9e9d3d86ad64f..28f49635d2ff65b1603e81ce398bd992cc03c2d9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,6 +8,7 @@ import { CreateCommentComponent } from './create-comment/create-comment.componen import { ParticipantHomeScreenComponent } from './participant-home-screen/participant-home-screen.component'; import { AuthenticationGuard } from './authentication.guard'; import { UserRole } from './user-roles.enum'; +import { ParticipantRoomComponent } from './participant-room/participant-room.component'; const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, @@ -34,6 +35,12 @@ const routes: Routes = [ canActivate: [AuthenticationGuard], data: { roles: [UserRole.PARTICIPANT] } }, + { + path: 'participant/room/:roomId', + component: ParticipantRoomComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + }, { path: '**', component: PageNotFoundComponent } ]; diff --git a/src/app/room-list/room-list.component.html b/src/app/room-list/room-list.component.html index 3e2cbb1f4f38a6be1d03dde3f4c32c03206e3466..5c96b0160fa03bc126ea52648f8037ae6535a916 100644 --- a/src/app/room-list/room-list.component.html +++ b/src/app/room-list/room-list.component.html @@ -1,6 +1,6 @@ <mat-list> <mat-list-item *ngFor="let room of rooms"> - <button mat-button routerLink="/room/{{room.id}}"> + <button mat-button routerLink="room/{{room.id}}"> {{room.name}} </button> </mat-list-item>