Answers for "reactive forms with radio buttons"

0

reactive forms radio button

<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>
Posted by: Guest on May-03-2020
0

reactive forms radio button

form: FormGroup;
  constructor(fb: FormBuilder) {
    this.name = 'Angular2'
    this.form = fb.group({
      gender: ['', Validators.required]
    });
  }
Posted by: Guest on May-03-2020

Code answers related to "reactive forms with radio buttons"

Browse Popular Code Answers by Language