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
Branches
Tags
No related merge requests found
<div fxLayout="row" fxLayoutAlign="center"> <div fxLayout="row" fxLayoutAlign="center">
<div fxLayout="column" fxLayoutGap="20px"> <div fxLayout="column" fxLayoutGap="20px">
<mat-progress-spinner *ngIf="isLoading" mode="indeterminate"></mat-progress-spinner>
<div *ngFor="let comment of comments"> <div *ngFor="let comment of comments">
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
......
...@@ -19,6 +19,7 @@ export class CommentListComponent implements OnInit { ...@@ -19,6 +19,7 @@ export class CommentListComponent implements OnInit {
userRole: UserRole; userRole: UserRole;
user: User; user: User;
comments: Comment[]; comments: Comment[];
isLoading = true;
constructor( constructor(
protected authenticationService: AuthenticationService, protected authenticationService: AuthenticationService,
...@@ -51,6 +52,7 @@ export class CommentListComponent implements OnInit { ...@@ -51,6 +52,7 @@ export class CommentListComponent implements OnInit {
this.commentService.searchComments(roomId, this.user.id) this.commentService.searchComments(roomId, this.user.id)
.subscribe(comments => this.comments = comments); .subscribe(comments => this.comments = comments);
} }
this.isLoading = false;
} }
setRead(comment: Comment): void { 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