I have angular form:
profileForm = new FormGroup({
firstName: new FormControl(''),
lastName: new FormControl(''),
});
<form [formGroup]="profileForm">
<label>
First Name:
<input type="text" formControlName="firstName">
</label>
<label>
Last Name:
<input type="text" formControlName="lastName">
</label>
</form>
Also I have an data object:
const person = { firstName: 'firstbla', lastName: 'lastbla' }
I want to bind the object into the form.
But when I form.firstName change it also reflect the change in person.firstName. (two-way data binding).
Is it possible to do in angular reactive form ? I try with patchValue, but it doesn't change the person.