#Update data after deleting item with *ngFor | async
13 messages · Page 1 of 1 (latest)
and <td ...> ????
there's obviously a td with a button that executes the delete user by id method
but nevermind, I think I found a way to do it
onDelete(id: number) { ... code to remove into array... manipulate items }
don't use | async because you need to manipulate the data directly (remove item)
items: any;
.....subscribe((data: any) => items = data);
*ngFor to items
for the good practices, you have to rename well the names of the variables and to use the typing (avoid to use : any)
You can use async + trackBy if you want to manipulate it
If you want to update it, your items$ must be getting value from some behaviour subject/subject
And that subject will next the newest array
g!codeblock @hallow geode Post your code