I've been diving into the world of MEAN stack and Angular, tackling a method within an angular component called itemListDetailsComponent (found in the .ts file) that looks something like this:
onStatusUpdateClick() {
this.activatedRoute.queryParams.subscribe((params: any) => {
console.log('queryParams', params['itemId']);
this.itemsUpdateService.updateItemStatus(
params['itemId'],
this.activatedRoute.data).subscribe(data => {
this.itemsUpdateService.statusChanged.emit("Status Changed");
}, error => {super.handleError(error, (err) => {console.log(err)})});
});
}
In addition to that, there's another angular component named itemsSideListComponent which presents a list of all items along with their respective statuses. Now, after the itemsListDetailComponent successfully saves and updates the status of the chosen item, I find myself in need of refreshing the displayed list of items within the itemsSideListComponent.
If anyone has insights on how I can achieve this refresh for the list of visible items in the itemsSideListComponent, triggered by the saved/updated data from the selected item in the itemListDetailsComponent, I would greatly appreciate it.
Your assistance is highly valued as I navigate my way through the complexities of angular development.