Goal: As a user, I want to delete a game
Keywords: custom event
- Implement
delete
inservices.dart
delete(int id) => ???;
- Fire a custom event on trash button click
- In
x-game
element, handle click on trash button - Fire a custom event
my-delete-event
embedding the game instance (Hints)
- Handle the custom event
-
In
x-games
element, handlemy-delete-event
<x-game game="{{game}}" ???="{{delete}}"></x-game>
-
Implement the handler to delete the game using
gameStoreService
Hints:
- Use dispatchEvent and CustomEvent