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 // safer
this.form.controlName.value // triggers type checking and breaks AOT
for Angular 6+ and >=RC.6
.html
<form [formGroup]="formGroup">
<input type="text" formControlName="myName">
</form>
.ts
public formGroup: FormGroup;
this.formGroup.value.myName
should also work.
Another option:
this.form.value['nameOfControl']