Angular · Junior · Question 21 of 75
Which block selects one of several templates by value?
- ✓Correct answer:
@switchwith@caseand@default - 2
@matchwith@when - 3
@ifwith@elseifonly
Explanation
@switch (status) { @case ('loading') {...} @case ('error') {...} @default {...} }. Cases are compared with ===, and there is no fall-through between them.