Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Flow migration does not handle [ngifelse] #52842

Closed
stefannikolei opened this issue Nov 13, 2023 · 2 comments
Closed

Control Flow migration does not handle [ngifelse] #52842

stefannikolei opened this issue Nov 13, 2023 · 2 comments
Assignees
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch)
Milestone

Comments

@stefannikolei
Copy link

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

@JeanMeche JeanMeche added area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch) labels Nov 13, 2023
@ngbot ngbot bot added this to the needsTriage milestone Nov 13, 2023
@jessicajaniuk jessicajaniuk self-assigned this Nov 13, 2023
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 13, 2023
…henElse

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842
jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 13, 2023
…henElse

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842
@jessicajaniuk
Copy link
Contributor

Thanks for the report! There's a fix now in #52869.

jessicajaniuk pushed a commit to jessicajaniuk/angular that referenced this issue Nov 13, 2023
…henElse

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842
jessicajaniuk pushed a commit that referenced this issue Nov 13, 2023
…henElse (#52869)

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: #52842

PR Close #52869
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this issue Dec 6, 2023
…henElse (angular#52869)

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842

PR Close angular#52869
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 14, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this issue Jan 23, 2024
…henElse (angular#52869)

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842

PR Close angular#52869
rlmestre pushed a commit to rlmestre/angular that referenced this issue Jan 26, 2024
…henElse (angular#52869)

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842

PR Close angular#52869
amilamen pushed a commit to amilamen/angular that referenced this issue Jan 26, 2024
…henElse (angular#52869)

This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: angular#52842

PR Close angular#52869
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants