-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(migrations): control flow migration omnibus bugfixes #53076
Conversation
a721c43
to
cc1d938
Compare
|
||
const expected = [ | ||
`@for (item of items; track item) {`, | ||
` <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: item}">`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a bit tricky, but NgTemplateOutlet
or CommonModule
needs to be imported for this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, though I think this use case is rare enough that if they have to manually add that in, it should be fine for the purposes of the migration.
c322e8f
to
4ed3a34
Compare
9e04765
to
abccf34
Compare
packages/core/schematics/ng-generate/control-flow-migration/index.ts
Outdated
Show resolved
Hide resolved
This fix preserves leading indents in inline templates and also adds better handling for self closing tags
This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068
Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule.
dd3f5a2
to
399aa7b
Compare
Caretaker Note: This requires a patch CL to land when this syncs in. |
packages/core/schematics/ng-generate/control-flow-migration/types.ts
Outdated
Show resolved
Hide resolved
This makes sure colons after else and then cases get migrated properly. fixes: angular#53150
This fix preserves leading indents in inline templates and also adds better handling for self closing tags PR Close angular#53076
…ngular#53076) This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068 PR Close angular#53076
…ngular#53076) Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule. PR Close angular#53076
…#53076) This makes sure colons after else and then cases get migrated properly. fixes: angular#53150 PR Close angular#53076
This fix preserves leading indents in inline templates and also adds better handling for self closing tags PR Close angular#53076
…ngular#53076) This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068 PR Close angular#53076
…ngular#53076) Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule. PR Close angular#53076
…#53076) This makes sure colons after else and then cases get migrated properly. fixes: angular#53150 PR Close angular#53076
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This fix preserves leading indents in inline templates and also adds better handling for self closing tags PR Close angular#53076
…ngular#53076) This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068 PR Close angular#53076
…ngular#53076) Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule. PR Close angular#53076
…#53076) This makes sure colons after else and then cases get migrated properly. fixes: angular#53150 PR Close angular#53076
This fix preserves leading indents in inline templates and also adds better handling for self closing tags PR Close angular#53076
…ngular#53076) This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068 PR Close angular#53076
…ngular#53076) Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule. PR Close angular#53076
…#53076) This makes sure colons after else and then cases get migrated properly. fixes: angular#53150 PR Close angular#53076
This fix preserves leading indents in inline templates and also adds better handling for self closing tags PR Close angular#53076
…ngular#53076) This adds code to cover the rare use case of an ngFor with a template param. fixes: angular#53068 PR Close angular#53076
…ngular#53076) Common module removal would not happen when a component used a templateUrl due to the checks being in separate files. This change passes the removal analysis back to the original source file to safely remove CommonModule. PR Close angular#53076
…#53076) This makes sure colons after else and then cases get migrated properly. fixes: angular#53150 PR Close angular#53076
This is an omnibus of minor formatting and bugfixes to the control flow migration:
/
*ngFor="x of y; template: templateName"
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?