Skip to content

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

Closed
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:ng-reflect
Closed

refactor(core): stop producing ng-reflect attributes by default#60973
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:ng-reflect

Conversation

@JeanMeche
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 alxhub and atscott April 23, 2025 18:17
@mmalerba
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit c2987d8.

The changes were merged into the following branches: main

@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 May 25, 2025
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: 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