10000 refactor(core): stop producing `ng-reflect` attributes by default by JeanMeche · Pull Request #60973 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

refactor(core): stop producing ng-reflect attributes by default #60973

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

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

BREAKING CHANGE:

This commit deprecates ng-reflect-* attributes and updates the runtime to stop producing them by default. Please refactor application and test code to avoid relying on ng-reflect-* attributes.

To enable a more seamless upgrade to v20, we've added the provideNgReflectAttributes() function (can be imported from the @angular/core package), which enables the mode in which Angular would be producing those attribites (in dev mode only). You can add the provideNgReflectAttributes() function to the list of providers within the bootstrap call.

BREAKING CHANGE:

This commit deprecates `ng-reflect-*` attributes and updates the runtime to stop producing them by default. Please refactor application and test code to avoid relying on `ng-reflect-*` attributes.

To enable a more seamless upgrade to v20, we've added the `provideNgReflectAttributes()` function (can be imported from the `@angular/core` package), which enables the mode in which Angular would be producing those attribites (in dev mode only). You can add the `provideNgReflectAttributes()` function to the list of providers within the bootstrap call.
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change area: core Issues related to the framework runtime labels Apr 23, 2025
@ngbot ngbot bot added this to the Backlog milestone Apr 23, 2025
@JeanMeche
Copy link
Member Author

Previously at #60954

@JeanMeche JeanMeche added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Apr 23, 2025
@JeanMeche
Copy link
Member Author

Caretaker note: we'll need to get cl/750304845 in beforehand.

@JeanMeche JeanMeche marked this pull request as ready for review April 23, 2025 12:57
* they are deprecated and only present for backwards compatibility. Angular will stop
* producing them in one of the future versions.
*
* @publicApi

Choose a reason for hiding this comment

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

Open question: should we deprecate it immediately? I guess we don't want people to use it in a longer run?

Copy link
Contributor

Choose a reason for hiding this comment

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

I actually really like this idea. Have we ever released a new api as deprecated before?

Copy link
Member
@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM. Just left a question about deprecating

Copy link
Contributor
@thePunderWoman thePunderWoman 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: public-api

@pullapprove pullapprove bot requested a review from atscott April 23, 2025 14:54
@pullapprove pullapprove bot requested a review from AndrewKushnir April 23, 2025 18:04
Copy link
Contributor
@AndrewKushnir AndrewKushnir 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: public-api

@AndrewKushnir AndrewKushnir added the target: major This PR is targeted for the next major release label Apr 23, 2025
@JeanMeche JeanMeche added the action: merge The PR is ready for merge by the caretaker label Apr 23, 2025
@JeanMeche JeanMeche removed request for atscott and alxhub April 23, 2025 18:17
@mmalerba
Copy link
Contributor

This PR was merged into the repository by commit c2987d8.

The changes were merged into the following branches: main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime detected: breaking change PR contains a commit with a breaking change merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0