add interval for refreshing users (#12)
Reviewed-on: #12 Reviewed-by: Hernd Beidemann <huydw@proton.me>
This commit is contained in:
parent
c39229dc94
commit
611a158d2d
@ -51,6 +51,10 @@ export class EmployeeListComponent implements OnInit{
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.employees$ = this.fetchEmployees();
|
||||
|
||||
setInterval(() => {
|
||||
this.employees$ = this.fetchEmployees();
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
private fetchEmployees(): Observable<Employee[]> {
|
||||
|
Reference in New Issue
Block a user