I have a code like this =>
return next.handle(req).pipe(
map((response: any) => {
if ( req.method !== “GET” && response instanceof HttpResponse && response.status === 200) {
this.alertService.showSuccessAlert();
}
return response;
}),
I want to show only one alert in multiple deletion. In the current scenario, one alert is shown per deleted item on the page, so this means a mess when 10 items are deleted.
I tried to solve by creating a boolean variable but it didn’t work.