From 49e5fa161bccff87f3892906b4e3cd110f345cde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Thu, 8 Mar 2018 19:53:18 +0100
Subject: [PATCH] Change route to 'participant/room/:roomId' which shows the
 ParticipantRoomCompent

---
 src/app/app-routing.module.ts              | 7 +++++++
 src/app/room-list/room-list.component.html | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 1d63c1420..28f49635d 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 3e2cbb1f4..5c96b0160 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>
-- 
GitLab