refactor(core): Deprecate the ngIf/ngFor/ngSwitch structural directives#60492
Hidden character warning
refactor(core): Deprecate the ngIf/ngFor/ngSwitch structural directives#60492JeanMeche wants to merge 2 commits intoangular:mainfrom
ngIf/ngFor/ngSwitch structural directives#60492Conversation
d3649bd to
5020395
Compare
3301c4a to
73a2608
Compare
ngIf/ngFor/ngSwitchngIf/ngFor/ngSwitch structural directives
2c71cdf to
fc50c52
Compare
7da3213 to
ec160b2
Compare
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: public-api
Reviewed-for: fw-general
There was a problem hiding this comment.
This will run the control flow migration automatically on ng update which users might not be prepared for. Should this be an optional migration so they get prompted to run it?
There was a problem hiding this comment.
This is what we decided in the last fw sync. We can rediscuss this if needed.
There was a problem hiding this comment.
I was under the impression that we decided to prompt users to migrate. There would likely be another migration once we actually remove the symbols.
…gSwitch`. Note: This is not a deprecation of structural directives, this only about `ngIf`/`ngFor`/`ngSwitch`. DEPRECATED: `ngIf`/`ngFor`/`ngSwitch` are deprecated. Use the control flow blocks instead (`@for`/`@if`/`@switch`).
|
What about self build structural directives that use ngIf as a base. They will have to copy extract the code from angular and move them to their own code base. It really feels wrong to be that there is so much effort put into new shiny stuff and removal of known working things. With class based guards and resolvers there was already massive backlash but it looks like the path of throwing things away is still followed. |
The migration had to be run manually before this change. It is now part of the update process when migrating to v20.
|
Caretaker note: cl/740341215 needs to get in with this PR. |
|
This PR was merged into the repository by commit e40b5c9. The changes were merged into the following branches: main |
|
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. |
The control flow @-blocks have been introduced in v17.
As an effort to unify & streamline template authoring, we are deprecating in v20 the structural directives
ngIf/ngFor/ngSwitch.The control flow schematics becomes a migration that is executed during
ng updateNote: This is not a deprecation of structural directives, this only about
ngIf/ngFor/ngSwitch.DEPRECATION:
ngIf/ngFor/ngSwitchare deprecated. Use the control flow blocks instead (@for/@if/@switch).If you're looking for argument for not keeping both control flow: