From 14f4872bc62d558b7650b8da34a6b47450878a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de> Date: Fri, 16 Mar 2018 10:33:09 +0100 Subject: [PATCH] Add loading spinner to comment-list --- src/app/comment-list/comment-list.component.html | 1 + src/app/comment-list/comment-list.component.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/app/comment-list/comment-list.component.html b/src/app/comment-list/comment-list.component.html index aa36d3c01..40aa567fa 100644 --- a/src/app/comment-list/comment-list.component.html +++ b/src/app/comment-list/comment-list.component.html @@ -1,5 +1,6 @@ <div fxLayout="row" fxLayoutAlign="center"> <div fxLayout="column" fxLayoutGap="20px"> + <mat-progress-spinner *ngIf="isLoading" mode="indeterminate"></mat-progress-spinner> <div *ngFor="let comment of comments"> <mat-card> <mat-card-content> diff --git a/src/app/comment-list/comment-list.component.ts b/src/app/comment-list/comment-list.component.ts index 64a0dc403..b942f1037 100644 --- a/src/app/comment-list/comment-list.component.ts +++ b/src/app/comment-list/comment-list.component.ts @@ -19,6 +19,7 @@ export class CommentListComponent implements OnInit { userRole: UserRole; user: User; comments: Comment[]; + isLoading = true; constructor( protected authenticationService: AuthenticationService, @@ -51,6 +52,7 @@ export class CommentListComponent implements OnInit { this.commentService.searchComments(roomId, this.user.id) .subscribe(comments => this.comments = comments); } + this.isLoading = false; } setRead(comment: Comment): void { -- GitLab