Switch based on the film's episode number (1-6) to output an emoji showing how you feel about the film.
- Open the app.component.html template file.
- One line 5 (after the title) create a new
<div>element. Apply the
NgSwitchattribute directive to this element, and switch on the
- Within the newly created
<div>element, create six new
<span>elements for each episode.
- On each
<span>element use the
NgSwitchCasestructural directive to specify the episode number, from
- Within each span either use a thumbs-up or a thumbs-down emoji to indicate if you liked the episode. You can also simply use the text "YASSS" or "meh..." within each
<span>according to your tastes.
- Keep in mind that we're using both the
NgSwitchattribute directive along with the
NgSwitchCasestructural directive in this exercise.
NgSwitchattribute directive accepts the value that you are "switching" on. This is similar to the expression that is specified in the
NgSwitchCasestructural directive accepts an expression upon which we will evaluate against the value specified to the
- In this exercise, we are "switching" on the
film.episodeproperty, and we are conditionally rendering a
<span>element based on the value of the episode, the integers