diff --git a/src/app/room-list/room-list.component.html b/src/app/room-list/room-list.component.html index 064298368a1775853e3f2f57ae3617c60b41091f..28a577a9dd214a14e16e897d6ca291441e0c8e29 100644 --- a/src/app/room-list/room-list.component.html +++ b/src/app/room-list/room-list.component.html @@ -12,7 +12,7 @@ {{ room.description }} </p> <mat-action-row> - <button mat-button routerLink="/{{ role }}/room/{{ room.id }}">Join room</button> + <button mat-button routerLink="/{{ baseUrl }}/room/{{ room.id }}">Join room</button> </mat-action-row> </mat-expansion-panel> </mat-accordion> diff --git a/src/app/room-list/room-list.component.ts b/src/app/room-list/room-list.component.ts index 823ed00cd4e684d883d66516999cf04f57f63f84..6b8dcec7c86e1c80c9a785aede510352af91571c 100644 --- a/src/app/room-list/room-list.component.ts +++ b/src/app/room-list/room-list.component.ts @@ -12,7 +12,7 @@ import {UserRole} from '../user-roles.enum'; export class RoomListComponent implements OnInit { rooms: Room[]; closedRooms: Room[]; - role: string; + baseUrl: string; constructor( private roomService: RoomService, @@ -25,9 +25,9 @@ export class RoomListComponent implements OnInit { getPath() { if (this.authenticationService.getRole() == UserRole.CREATOR) { - this.role = 'creator'; + this.baseUrl = 'creator'; } else { - this.role = 'participant'; + this.baseUrl = 'participant'; } }