I am working on a project where I get the coords of the phone. I want to put latitude and longitude into two form fields, but if i put {{ lat }} into the form fields value, I get an error “Expression has changed after it was checked”.
If I put into the placeholder, there is no problem.
What this error can generally be translated to is “control fight”. Make sure you only have one binding managing each form field (such as formControlName, [(ngModel)], [value]) . If you have more than one, they’ll fight one another.
I think I only have one. I guess the problem is that the form is rendered when the page is loaded, but the coordinates at found after the page is loaded. But shouldn’t it be possible to add a value to a form field after it is loaded?