“Tombol Radio Angular 9 Diperiksa” Kode Jawaban

Angular Cara Memeriksa Radiobox

<p>
   <input type="radio" value="male" name="gender" [ngModel]="user.gender" > Male
   <input type="radio" value="female" name="gender" [ngModel]="user.gender" > Female
</p>
<p>
   <input type="checkbox" name="tc" [ngModel]="user.isTCAccepted" >
</p> 
Unsightly Unicorn

Tombol Radio Angular 9 Diperiksa

Try to specify value attributes. And do not forget that in case of radio buttons Model is not supposed to contain boolean value but should contain radio specific values like:

  <input type="radio" name="food" value="beef" [(ngModel)]="myFood"> Beef
  <input type="radio" name="food" value="lamb" [(ngModel)]="myFood"> Lamb
  <input type="radio" name="food" value="fish" [(ngModel)]="myFood"> Fish
Santino

Jawaban yang mirip dengan “Tombol Radio Angular 9 Diperiksa”

Pertanyaan yang mirip dengan “Tombol Radio Angular 9 Diperiksa”

Lebih banyak jawaban terkait untuk “Tombol Radio Angular 9 Diperiksa” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya