afterNextRender documentation lacks details and limitations #55870
Labels
area: core
Issues related to the framework runtime
area: docs
Related to the documentation
needs: clarification
This issue needs additional clarification from the reporter before the team can investigate.
Milestone
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
We are using
MessageChannel.portX.postMessage
andPromise.resolve().then
to schedule tasks and micro-tasks. It allows to schedule code to execute after render (at least it used to work) and after certain callbacks. Also, our code is aware of zones, so it will run angular tasks in angular zone and root tasks in root zone.I've tried to replace
MessageChannel
hack withafterNextRender
which in theory should be a drop-in replacement but it quickly became obvious that it will not work because it requires injection context or explicitly provided injector which is extremely inconvenient and leads to errors that are difficult to reason about.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: