Angular
Let's Code Together - Flopnames

Set Background to Red on Click

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

In this video

We set the css class of a tile to "red" whenever the tile is clicked.

Code Checkpoint:

If you want to use the same code as in the video, you Can use this code checkpoint: https://stackblitz.com/fork/angular-ivy-gv8ju7

Assignment:
  1. Create a model to contain the correct class for each tile based on position.
  2. Make the model an array of arrays.
  3. Make the arrays contain just string elements that are the correct tile type/css class, i.e. "red", "blue", "neutral", or "assassin".
  4. We will use this model in the next part to correctly set the class on a tile when clicked.
 

I finished! On to the next chapter