Starting with the knowledge that I have come across a similar query on StackOverflow, but it only addressed the difference.
My question is centered around determining when to use each method and understanding the potential drawbacks of both.
I am aware that using `detectChanges` triggers an immediate change detection cycle for both the element and its children, while `markForCheck` simply flags the current element and its ancestors as needing checking during the next cycle.
This inquiry stems from my uncertainty about always resorting to `markForCheck` in asynchronous calls.
Take, for example, an `InputComponent` which wraps a standard HTML input and has `ChangeDetectionStrategy.OnPush` activated.
In scenarios where I retrieve data asynchronously from the server to update a list of options within this `InputComponent`, two approaches are viable.
The first option (which I believe is preferable) involves using `detectChanges` as it ensures checks are limited to this particular component, whereas `markForCheck` would involve checking the entire branch of the tree.
Therefore, the question remains - what method should be utilized and is there ever a necessity to utilize `markForCheck`?