-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Angular HTML ngif - else issue #5539
Copy link
Copy link
Closed
Labels
lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues 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.Please 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!Issues with an accompanying pull request. These issues will probably be fixed soon!
Milestone
Metadata
Metadata
Assignees
Labels
lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues 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.Please 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!Issues with an accompanying pull request. These issues will probably be fixed soon!
Prettier 1.15.1
When using the 'angular' formatter, this code:
<ng-container *ngIf="data?.title; else defaultTitle">{{ data.title | translate }}
gets reformatted this way: (notice the ":" after the "else")
<ng-container *ngIf="data?.title; else: defaultTitle">{{ data.title | translate }}
When forcing the "html" parser for *.component.html files, this does not happen.
Expected behavior:
no ":" gets added after the "else", as this is not a valid angular template syntax.
Thank you!
Frederic