Exercise: Delete Entity
Use the @ngrx/entity library to delete an entity from the resort collection.
Steps
- Add a new
DeleteResort
action in src/app/state/resort/resort.actions.ts - Update the
reducer()
in src/app/state/resort/resort.reducer.ts to use the adapter'sremoveOne()
method for removing the resort. - Update the
FavoritesComponent
in src/app/+favorites/containers/favorites/favorites.component.ts to dispatch theDeleteResort
action in theonDelete()
method