@switch

Template syntax that shows one of several blocks based on a value.

What does @switch do?

@switch picks one block of the template to show based on a value, like a switch statement.

@switch (order.status) {
  @case ('shipped') { <p>On its way!</p> }
  @case ('delivered') { <p>Delivered</p> }
  @default { <p>Processing</p> }
}

Level: Apprentice · More Angular terms at this level

Updated