Skip to content

fix(core): ensure default path is set for control flow migration#64296

Closed
aparzi wants to merge 1 commit intoangular:mainfrom
aparzi:fix-issue-63945
Closed

fix(core): ensure default path is set for control flow migration#64296
aparzi wants to merge 1 commit intoangular:mainfrom
aparzi:fix-issue-63945

Conversation

@aparzi
Copy link
Copy Markdown
Contributor

@aparzi aparzi commented Oct 8, 2025

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue occurred because ng update doesn't apply schema defaults like ng generate does. This fix handles both cases by explicitly setting default values in the migration code.

Issue Number: #63294

What is the new behavior?

This change ensures a default value of './' is used when no path is explicitly provided, making the migration work consistently between ng update and ng generate commands.

Does this PR introduce a breaking change?

  • Yes
  • No

When running the control flow migration via `ng update`, the path parameter could be undefined. This change ensures a default value of './' is used when no path is explicitly provided, making the migration work consistently between `ng update` and `ng generate` commands.

Fixes angular#63294
@pullapprove pullapprove bot requested a review from JeanMeche October 8, 2025 15:52
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Oct 8, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 8, 2025
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Oct 8, 2025
@JeanMeche
Copy link
Copy Markdown
Member

I doesn't merge cleanly into the patch branch. Can you open a 2nd PR that targets the 20.3.x branch. Thank you.

@aparzi
Copy link
Copy Markdown
Contributor Author

aparzi commented Oct 8, 2025

I doesn't merge cleanly into the patch branch. Can you open a 2nd PR that targets the 20.3.x branch. Thank you.

I opened 2nd PR --> #64298

@JeanMeche JeanMeche removed the action: merge The PR is ready for merge by the caretaker label Oct 8, 2025
@crisbeto
Copy link
Copy Markdown
Member

crisbeto commented Oct 8, 2025

This shouldn't be necessary after #64253.

@JeanMeche
Copy link
Copy Markdown
Member

Then we should probably backport it to patch as we already have the reports in #63294.

@crisbeto
Copy link
Copy Markdown
Member

crisbeto commented Oct 8, 2025

My impression was that the migration is in ng update in v21.

@JeanMeche
Copy link
Copy Markdown
Member

The migration was only via ng generate pre-v20.
In v20 with the deprecation of ngIf/ngFor we made it an optional migration via ng update.
For v21, we flipped the optional flag, making it mandatory.

@JeanMeche JeanMeche closed this Oct 9, 2025
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Nov 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: core Issues related to the framework runtime target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants