Outline
-
Let's Code Together - Flopnames
- Introduction
- Demo Code Introduction
- First Assignment
- Create Toggle Button Event Handler
- Show & Hide the Key
- Toggle Team Name Display
- Toggle Team Name Color
- Handle Grid Cell Click
- Create Background Color Binding
- Set Background to Red on Click
- Create a Model for the Tiles
- Set Background Correctly
- Create new Child Component Files
- Move Game Grid Display to new Child Component
- Write the Initial checkForWinner Method
- Refactor Into a countTile Method
- Log Out the Correct Winner
- Report the Winner to the Parent Component
- Show the User the Winner
- Create the Game Service
- Extract Game Logic to Service & Summary
Outline
-
Let's Code Together - Flopnames
- Introduction
- Demo Code Introduction
- First Assignment
- Create Toggle Button Event Handler
- Show & Hide the Key
- Toggle Team Name Display
- Toggle Team Name Color
- Handle Grid Cell Click
- Create Background Color Binding
- Set Background to Red on Click
- Create a Model for the Tiles
- Set Background Correctly
- Create new Child Component Files
- Move Game Grid Display to new Child Component
- Write the Initial checkForWinner Method
- Refactor Into a countTile Method
- Log Out the Correct Winner
- Report the Winner to the Parent Component
- Show the User the Winner
- Create the Game Service
- Extract Game Logic to Service & Summary
In this video
We display the winning team to the user using the H2 on the app component.
Assignment:
- Create the Game Service .
- Name the file game.service.ts and put it in the app folder.
- Don't forget to export the class.
- Inject the service into the gamegrid component.