diff --git a/src/app/comment-list/comment-list.component.html b/src/app/comment-list/comment-list.component.html index aa36d3c01a01dd797025b0faa41879ad0ebbc6e4..40aa567fa57c3d910a6e52b3ec515eaef5617384 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 64a0dc40384c141f694d8ccddc4f00f36f643807..b942f10370cb9f3b354f163b58b8404b3089d2dc 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 {