You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[18.1] AfterNextRender only invokes first phase callback when provided multiple via new API #56979
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
The new AfterRender/AfterNextRender API in v18.1 allows providing callbacks for different phases in a single call. This works fine for AfterRender, but doesn't for AfterNextRender.
Repro by creating minimal app via 18.1 cli and add:
the fix only worked half way... multiple phases now gets called, but if try to pass a parameter from one phase to the next, it doesn't work with AfterNextRender, the parameter is always undefined (but again it works with AfterRender!)
Activity
JoostK commentedon Jul 14, 2024
Ah, indeed, the destruction logic is incorrect. The first callback that executes destroys all other phases for which a callback had been registered.
/cc @mmalerba
fix(core): not all callbacks running when registered at the same time
fix(core): not all callbacks running when registered at the same time (…
fix(core): not all callbacks running when registered at the same time (…
atsjo commentedon Jul 17, 2024
the fix only worked half way... multiple phases now gets called, but if try to pass a parameter from one phase to the next, it doesn't work with AfterNextRender, the parameter is always undefined (but again it works with AfterRender!)
JeanMeche commentedon Jul 17, 2024
@atsjo You're right, 2nd PR is up #57031
angular-automatic-lock-bot commentedon Aug 17, 2024
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.