I have some cards displayed in the UI.
<div *ngFor="let item of cards | async">...</div>
Obviosuly cards will be the Observable of array of type card.
So I have an interface of card lets say it has 3 properties
Id, name, description.
My use case is.
I want to add new card to the observables array and must reflect to array.
I want to delete the card from the observable and must reflect to the template.
I must be able to filter the card baaed on lets say name and must be reflected in the template.
In short all the aperations must be done in the observable as I have used async pipe in the template.
to do that you can use
map
rxjs operator like the following :Add item to the observable array
Remove item from the observable array
And finally in your Html :