Fix: Do not run change detection if ready does not have listeners.
The ngZone.run is used to re-enter the Angular zone and notify that something may have potentially changed to force Angular to run change detection. The change detection is considered as no-op change detection; basically tick() has run but nothing has changed. There's no reason to trigger ngZone.run when developers are not listening to the ready event in their code.
Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.
Suggested merge commit message (convention)
Fix: Do not run change detection if
ready
does not have listeners.The
ngZone.run
is used to re-enter the Angular zone and notify that something may have potentially changed to force Angular to run change detection. The change detection is considered as no-op change detection; basicallytick()
has run but nothing has changed. There's no reason to triggerngZone.run
when developers are not listening to theready
event in their code.Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.