Skip to content

Angular @defer block not formatted correctly #125

Description

@lizclipse

Angular supports the @defer syntax for lazy-loading components, but this plugin doesn't format these block correctly.

Expected:

@defer {
  <p>Hello world</p>
}

Actual:

@defer {
<p>Hello world</p>
}

Side-note: Angular templates do not allow @ to be used outside of the control-flow syntax (it is a compiler error), meaning that if that character shows up in a template it is guaranteed to be template syntax and not general text. I only mention this as it could help with make this plugin a bit more future-proof by always parsing @block { ... } @other { ... } syntax as code-blocks, even if the specific keyword isn't known.

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