diff --git a/src/app/delete-employee/delete-employee.component.ts b/src/app/delete-employee/delete-employee.component.ts index 26af39c..992bfff 100644 --- a/src/app/delete-employee/delete-employee.component.ts +++ b/src/app/delete-employee/delete-employee.component.ts @@ -30,5 +30,7 @@ export class DeleteEmployeeComponent { deleteEmployee(id: number) { this.apiService.deleteById(id).subscribe(); + + location.reload(); } } diff --git a/src/app/employee-list/employee-list.component.ts b/src/app/employee-list/employee-list.component.ts index eb0f6da..c2b5d4d 100644 --- a/src/app/employee-list/employee-list.component.ts +++ b/src/app/employee-list/employee-list.component.ts @@ -51,10 +51,6 @@ export class EmployeeListComponent implements OnInit{ public ngOnInit(): void { this.employees$ = this.fetchEmployees(); - - setInterval(() => { - this.employees$ = this.fetchEmployees(); - }, 5000) } private fetchEmployees(): Observable { diff --git a/src/index.html b/src/index.html index 625b64b..89ee835 100644 --- a/src/index.html +++ b/src/index.html @@ -9,7 +9,7 @@ - +