How get checked value from radio button angular

前端 未结 1 1580
时光取名叫无心
时光取名叫无心 2021-02-14 22:52

I need to get value from radio button in angular. Suppose to have this html code:

 
1条回答
  •  天命终不由人
    2021-02-14 23:11

    You can bind the data of radio button. Just add the value for radio button and change in the ngModel

    html

    
    

    ts

    onItemChange(value){
       console.log(" Value is : ", value );
    }
    

    0 讨论(0)
提交回复
热议问题