Angular has released the new '@switch' block syntax similar to Javascript
The
@switch
blocks displays content selected by one of the cases matching against the conditional expressionThe
@default
block is optional and can be omitted. If no@case
matches the expression and there is no@default
block, nothing is shown@switch
does not have fallthrough, so you do not need an equivalent to a break or return statement.
Top comments (0)