I'm trying to understand how change detection and ChangeDetectionStrategy.OnPush actually work, here is an example of something weird I cannot understand:
I create a father component with the following template:
<app-matrix-reader *ngFor="let m of fooService.getMatrices()" [matrix]="m"></app-matrix-reader>
The child component app-matrix-reader has an input text.
<input type="text" [(ngModel)]="matrix.a" /><br/>
If I simply click through the inputs multiple times (even without change its value) the function getMatrices is called.
Why the function getMatrices() is called? I also put changeDetectionStrategy.OnPush so the components should be checked and updated only if their input are updated...
Thank you