Book
Submodule 22.1: Angular and Reactive programming - Practice
Submodule 22.1: Angular and Reactive programming - Practice
Completion requirements
View
Update dishdetail.component.ts
Similarly update dishdetail.component.ts to subscribe to the observables from the service.
ngOnInit() {
this.dishservice.getDish(id).subscribe(dish => this.dish = dish);
}
Here the process is similar to what we did in the menu component.ts, but now we take only the selected dish which comes from the filter applied in the array.