Return to site

🅰️1️⃣7️⃣ Which of the following is a valid way to write a @switch block in Angular 17?

· frontend,angular

#angular #angular17 #switch #newSyntax #frontend

The correct answer is C. The @switch block in Angular 17 requires curly braces around each case and default block, and uses the @default keyword to specify the default case³. The other options are either missing the curly braces, the @default keyword, or using a colon instead of a curly brace.