Skip to content
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): execute template creation in non-reactive context #49883

Conversation

pkozlowski-opensource
Copy link
Member

This fix assures that templates functions executed in the creation mode are run outside of the reactive context. This avoids the situation where signal reads in a directive constructor (executed as part of the creation mode) would mark the host component as dirty.

Fixes #49871

This fix assures that templates functions executed in the creation mode
are run outside of the reactive context. This avoids the situation where
signal reads in a directive constructor (executed as part of the creation
mode) would mark the host component as dirty.

Fixes angular#49871
@pkozlowski-opensource pkozlowski-opensource added area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate cross-cutting: signals labels Apr 17, 2023
@ngbot ngbot bot modified the milestone: Backlog Apr 17, 2023
@pkozlowski-opensource pkozlowski-opensource added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 17, 2023
@pkozlowski-opensource pkozlowski-opensource marked this pull request as ready for review April 17, 2023 11:44
@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 18, 2023
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit b7392f9.

jessicajaniuk pushed a commit that referenced this pull request Apr 18, 2023
This fix assures that templates functions executed in the creation mode
are run outside of the reactive context. This avoids the situation where
signal reads in a directive constructor (executed as part of the creation
mode) would mark the host component as dirty.

Fixes #49871

PR Close #49883
@angular-automatic-lock-bot
Copy link

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 19, 2023
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 cross-cutting: signals target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing to signals is not allowed in callbacks
3 participants