Let's Code Together - Refactoring Flopnames

Use ngIf on Winning Message


The Law of Demeter

In this video

We create the gameOver property and bind to it.

Assignment: refactor the checkForWinner method
  1. Create a sub method to set the winner, called setWinner that does 2 things:
    1. set the name of the winning team.
    2. set gameOver to true.
  2. In the checkForWinner method, just return gameOver at the end of the method.

I finished! On to the next chapter