Angular 5 Reactive Forms – Radio Button Group
I tried your code, you didn’t assign/bind a value to your formControlName. In HTML file: <form [formGroup]=”form”> <label> <input type=”radio” value=”Male” formControlName=”gender”> <span>male</span> </label> <label> <input type=”radio” value=”Female” formControlName=”gender”> <span>female</span> </label> </form> In the TS file: form: FormGroup; constructor(fb: FormBuilder) { this.name=”Angular2″ this.form = fb.group({ gender: [”, Validators.required] }); } Make sure you use Reactive … Read more