Outline
-
Let's Code Together - Refactoring Flopnames
- Introduction
- First Assignment
- Set the Title
- Toggle Key with a Visibility Style Binding
- Use ngIf on Winning Message
- Refactor the checkForWinner method
- Use Class Bindings for the Team Display
- Remove the teamTextClass property
- Move the currentTeam property to the service
- Don't Pass currentTeam into the gamegrid Component
- Make currentTeam a Model Object
- Create a Team Model
- Make Winner Property a Team
- Create the Tiles Data in the gamegrid Component
- Create a Tile Model
- Render the Tiles in an ngFor
- Hook up the New Click Event
- Log out the Tile Type
- Fix the Tile Background Display
- Make the Game Grid Work Again
- Render the Grid Key Dynamically & Summary
Outline
-
Let's Code Together - Refactoring Flopnames
- Introduction
- First Assignment
- Set the Title
- Toggle Key with a Visibility Style Binding
- Use ngIf on Winning Message
- Refactor the checkForWinner method
- Use Class Bindings for the Team Display
- Remove the teamTextClass property
- Move the currentTeam property to the service
- Don't Pass currentTeam into the gamegrid Component
- Make currentTeam a Model Object
- Create a Team Model
- Make Winner Property a Team
- Create the Tiles Data in the gamegrid Component
- Create a Tile Model
- Render the Tiles in an ngFor
- Hook up the New Click Event
- Log out the Tile Type
- Fix the Tile Background Display
- Make the Game Grid Work Again
- Render the Grid Key Dynamically & Summary
In this video
We remove the currentTeam being passed into the gamegrid component
Assignment: Make currentTeam a model object
- Make currentTeam an object.
- Create a redTeam property and a blueTeam property on the component.
- These properties should be objects that have a displayName property that is set to "Red" or "Blue".
- Refactor the app where it uses the currentTeam property.