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

Add loading spinner to comment-list

parent 8e2d5841
No related merge requests found
<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>
......
......@@ -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 {
......
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