-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Closed
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationscore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Was:
<span *ngIf="instance.name else unnamed">{{instance.name}}</span>
<ng-template #unnamed>
<span i18n>Unnamed Instance</span>
</ng-template>After migration:
@if (b.name else unnamed) {
<span>{{b.name}}</span>
}
<ng-template #unnamed>
<span i18n>Unnamed Instance</span>
</ng-template>it gives error: NG5002: Parser Error: Unexpected token 'else'
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
NG5002: Parser Error: Unexpected token 'else'
Please provide the environment you discovered this bug in (run ng version)
"@angular/core": "^17.0.4"
Anything else?
I have to say, that this migration right now works much better - thank you for all bugfixes!
Metadata
Metadata
Assignees
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationscore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)