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(core): run afterRender callbacks outside of the Angular zone #51385
Conversation
a50345d
to
7a228ed
Compare
d5c9d9f
to
b5ba43d
Compare
cc @kara |
@devknoll can you change the commit to |
b5ba43d
to
5dc585e
Compare
5dc585e
to
a1778a2
Compare
afterRender should run outside of the Angular zone so that it does not trigger further CD cycles
a1778a2
to
e1df8b9
Compare
@devknoll I see this has |
@jessicajaniuk oh, my mistake. I added the label bc I didn't see it already ran. Will remove. |
@devknoll I'm going to update this to |
This PR was merged into the repository by commit 3a19d6b. |
…ular#51385) afterRender should run outside of the Angular zone so that it does not trigger further CD cycles PR Close angular#51385
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. |
…ular#51385) afterRender should run outside of the Angular zone so that it does not trigger further CD cycles PR Close angular#51385
afterRender should run outside of the Angular zone so that it does not trigger further CD cycles
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Callbacks are executed in the Angular zone, causing patched APIs like
setTimeout
to trigger subsequent change detection cycles, and furtherafterRender
callbacks.Issue Number: #51343
What is the new behavior?
Callbacks are always executed outside of the Angular zone, preventing accidental infinite render loops.
Does this PR introduce a breaking change?
afterRender
is in developer preview, and so this is not considered a breaking change.Other information
Closes #51343