Reputation: 21
I am sorry to say that I failed to find a radio button example in the AngularJS 2 FORMS documentation. Please give a live example. Thanks.
Upvotes: 0
Views: 276
Reputation: 584
Please try those code:
Html
<form>
<input type="radio" [checked]="radioValue" (click)="clickRadio()"/>
</form>
radio value: {{radioValue}}
ts
radioValue:boolean = false;
clickRadio(){
this.radioValue = !this.radioValue
}
Upvotes: 1