https://stackoverflow.com/questions/49078286/angular-5-reactive-forms-radio-button-group
HTML
<form [formGroup]="form">
<input type="radio" [value]="true" formControlName="gender">Male
<input type="radio" [value]="false" formControlName="gender">Female
</form>
Componentget gender() { return this.formgroup.get("gender")
}//this.formGroup = this.formBuilder.group({gender: [true, []]})
No comments:
Post a Comment