Skip to content

fix(compiler): declare for loop aliases in addition to new name#54942

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:for-loop-aliases
Closed

fix(compiler): declare for loop aliases in addition to new name#54942
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:for-loop-aliases

Conversation

@crisbeto
Copy link
Member

Currently when aliasing a for loop variable with let, we replace the variable's old name with the new one. Since users have found this to be confusing, these changes switch to a model where the variable is available both under the original name and the new one.

Fixes #52528.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release area: compiler Issues related to `ngc`, Angular's template compiler labels Mar 19, 2024
@ngbot ngbot bot added this to the Backlog milestone Mar 19, 2024
Currently when aliasing a `for` loop variable with `let`, we replace the variable's old name with the new one. Since users have found this to be confusing, these changes switch to a model where the variable is available both under the original name and the new one.

Fixes angular#52528.
@crisbeto crisbeto requested a review from dylhunn March 19, 2024 13:02
@crisbeto crisbeto marked this pull request as ready for review March 19, 2024 13:02
@pullapprove pullapprove bot requested a review from alxhub March 19, 2024 13:02
@crisbeto crisbeto modified the milestones: Backlog, v18-candidates Mar 19, 2024
Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: fw-core, fw-compiler

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 20, 2024
@crisbeto crisbeto removed the request for review from alxhub March 20, 2024 22:03
@dylhunn
Copy link
Contributor

dylhunn commented Mar 22, 2024

This PR was merged into the repository by commit eb625d3.

@dylhunn dylhunn closed this in eb625d3 Mar 22, 2024
@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 Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

control flow: Property '$index' does not exist on type 'TestComponent'.

3 participants