Skip to content

Control Flow migration does not handle [ngifelse] #52842

@stefannikolei

Description

@stefannikolei

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

<ng-template [ngIf]="..." [ngIfElse]="otherBranch">
	...
</ng-template>
<ng-template #otherBranch>
	...
</ng-template>

will migrate to

@if (...) {
	<ng-template [ngIfElse]="otherBranch">
		{{ ... }}
	</ng-template>
}
<ng-template #otherBranch>
	{{ ... }}
</ng-template>

i expected following code

@if (...) {
	<ng-template>
		{{ ... }}
	</ng-template>
}
@else {
	<ng-template>
		{{ ... }}
	</ng-template>
}

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular: 17.0.1

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area: migrationsIssues related to `ng update`/`ng generate` migrationscore: control flowIssues related to the built-in control flow (@if, @for, @switch)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions