I'm currently working on an Angular 6 applicaiton. I try to call a method from an expression. Unfortunately it seems it doesn't work anymore.
The example is very simple and looks like that in my car.component.html:
<div>Car Name: {{ getCarName() }} </div>
In my component code car.component.ts, I implemented that function something like that:
getCarName() {
return this.carName;
}
Actually I'm changing the property carName each time I hover over another div on my component UI.
Unfortunately I'm getting the following error:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value...
Do you know how to solve this issue?
Thank you!!