Skip to content
Snippets Groups Projects
Verified Commit 49e5fa16 authored by Lukas Mauß's avatar Lukas Mauß Committed by Lukas Maximilian Kimpel
Browse files

Change route to 'participant/room/:roomId' which shows the ParticipantRoomCompent

parent e4aca90a
1 merge request!57Resolve "participant home screen - html template (room)"
......@@ -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 }
];
......
<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>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment