I'm getting following error on [height] on main component and looking for solution
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '753'. Current value: '731'.
I have three components that need to be rendered in a fixed size panel.
Depending on how many top components and bottom components are rendered in the screen, the main component size(height) should be changed.
only solution I have find is using offsetHeight, but the error is thrown on angular.
I know I can solve this using jQuery or Javascript? But looking for a pure Angular solution.
<div #panelbody>
<div #top>
<top *ngFor="let top of tops; let i = index" [index]="i"></top>
</div>
<main [height]="panelbody.offsetHeight - top.offsetHeight - bottom.offsetHeight - 10"></main>
<div #bottom class="text-center">
<bottom *ngFor="let bottom of bottoms(); let i = index" [index]="i">
</bottom>
</div>
</div>