Skip to content

[Angular] Format interpolation inside attributes #5477

@YarnSphere

Description

@YarnSphere

Prettier 1.15.2
Playground link

--parser angular

Input:

<div class="hello {{ x ?      'a' 
            : z
  }}">
	{{ y
      +
     1}}
</div>

Output:

<div
  class="hello {{ x ?      'a' 
            : z
  }}"
>
  {{ y + 1 }}
</div>

Expected behavior:

<div class="hello {{ x ? 'a' : z }}">
  {{ y + 1 }}
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions