Exercise: Delete Entity
Use the @ngrx/entity library to delete an entity from the resort collection.
Steps
- Add a new
DeleteResortaction 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
FavoritesComponentin src/app/+favorites/containers/favorites/favorites.component.ts to dispatch theDeleteResortaction in theonDelete()method