Skip to content
Snippets Groups Projects
Commit 8e2d5841 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Add loading spinner to room-list view

parent 4b751e68
No related merge requests found
<mat-accordion>
<div fxLayout="row" fxLayoutAlign="center">
<mat-progress-spinner *ngIf="isLoading" mode="indeterminate"></mat-progress-spinner>
</div>
<mat-expansion-panel *ngFor="let room of rooms">
<mat-expansion-panel-header>
<button mat-button color="primary" routerLink="/{{ baseUrl }}/room/{{ room.id }}"><mat-icon>send</mat-icon></button>
<button mat-button color="primary" routerLink="/{{ baseUrl }}/room/{{ room.id }}">
<mat-icon>send</mat-icon>
</button>
<mat-panel-title>
{{ room.shortId }}
</mat-panel-title>
......
......@@ -13,6 +13,7 @@ export class RoomListComponent implements OnInit {
rooms: Room[];
closedRooms: Room[];
baseUrl: string;
isLoading = true;
constructor(
private roomService: RoomService,
......@@ -35,6 +36,7 @@ export class RoomListComponent implements OnInit {
this.roomService.getRooms().subscribe(rooms => {
this.rooms = rooms;
this.closedRooms = this.rooms.filter(room => room.closed);
this.isLoading = false;
});
}
}
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