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
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
We are using MessageChannel.portX.postMessage and Promise.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 with afterNextRender 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
NG0203 - missing context, then other non-angular errors due to unexpected context because I provided app module injector.
Please provide the environment you discovered this bug in (run ng version)
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: