Imagine the following structure of components in Angular2
A
B
D E
When D
triggers an event by clicking on B
, Angular2
will automatically initiate change detection starting from the root component A
. But is there a method to log this change detection even if D
is not directly emitting the event to A
?
For instance, in component D
:
html
<div (click)="update($event)"></div>
component
@Output() myOutputName = new EventEmitter();
update(event) {
this.myOutputName.emit('some value');
}
In component B
:
(myOutputName)="update($event)"
However, if B
does not pass on that event, there is no way for me to confirm if A
is executing its change detection.
This task aims to identify which component is currently undergoing Change Detection
for the purpose of debugging.