i got this code:
ngOnInit(): void { this.getEmployees(); this.employeesService .reloadEmployees() .subscribe(() => this.getEmployees()); this.employeesService.searchValue$ .subscribe(value => this.employeesService.searchEmployees(value) .subscribe(el => this.allEmployees = el)); } Do you guys think that I can simplify that code? What should I do? I need to reduce that subscriptions, because at this point it doesnt look great
getEmployees? Normally a getter method returns the thing it's getting, but you're not using that value, so I imagine there's some random side effect in that function you're interested in. What is it and why?