Our goal is to avoid using 2-way binding in our component setup:
<select type="text" formControlName="region" (change)="regionChanged($event)">
<option *ngFor="let region of regionsDDL" [ngValue]="region">{{region.name}}</option>
</select>
The form is created reactively using the form builder:
this.fb.group({
.
region:...
.
});
In the event handler, we aim to retrieve the entire object linked to the selected option. Is it safe to access the form group value like this?
regionChanged($event) {
let selectedRegion = this.basicInfoForm.controls["region"].value;
}
Or is there a chance that the form control value may not be updated before the (change) event occurs?