How to find which async action triggers ngZone (that lead to Change Detection)?
问题 Any changes in the stack trace of updates always lead back to globalZoneAwareCallback . How do you find out what triggered the change? In terms of debugging it's good to have a clear picture. 回答1: globalZoneAwareCallback is a function declared in zonejs for handling all event callbacks with capture=false . (btw, for capture=true there is globalZoneAwareCaptureCallback ) It means that any event listener will first go through this method. That listener can be added on the page by Angular, by