How to get a single value from FormGroup How to get a single value from FormGroup angular angular

How to get a single value from FormGroup


You can get value like this

this.form.controls['your form control name'].value


Yes, you can.

this.formGroup.get('name of you control').value


Dot notation will break the type checking, switch to bracket notation. You might also try using the get() method. It also keeps AOT compilation in tact I've read.

this.form.get('controlName').value // saferthis.form.controlName.value // triggers type checking and breaks AOT