reactive forms radio button

Solutions on MaxInterview for reactive forms radio button by the best coders in the world

showing results for - "reactive forms radio button"
Nyla
19 May 2019
1<form [formGroup]="form">
2   <label>
3     <input type="radio" value="Male" formControlName="gender">
4       <span>male</span>
5   </label>
6   <label>
7     <input type="radio" value="Female" formControlName="gender">
8       <span>female</span>
9   </label>
10</form>
11
Filippo
28 Nov 2018
1  form: FormGroup;
2  constructor(fb: FormBuilder) {
3    this.name = 'Angular2'
4    this.form = fb.group({
5      gender: ['', Validators.required]
6    });
7  }
8