Skip to content

Angular @switch doesnt support @default in non-last position #110

@lizclipse

Description

@lizclipse

If a @default block is not last in a @switch block, it will error out. Default blocks can be positioned anywhere, and sometimes you want it to be first. Example:

@switch (value) {
  @default {
    <p>default</p>
  }
  @case ('first') {
    <p>first</p>
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions