Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular 9 radio button checked

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
Source by www.concretepage.com #
 
PREVIOUS NEXT
Tagged: #angular #radio #button #checked
ADD COMMENT
Topic
Name
4+6 =