set form control value angular code example
Example 1: reactive form programmatically set value
this.formRef.patchValue({
field: value1,
field2: value2,
/* ... */
});
Example 2: angular access form control value
formGroup.controls['nameOfTheField'].value