Ajay Malhotra Ajay Malhotra - 1 month ago 6
AngularJS Question

How to get checked radio button value with angularjs click funciton?

Here are the code:

I want to get checked radio button value with angularjs click funciton?

<input type="radio" name="calender" value="calender">
<input type="radio" name="calender" value="calender2" checked="checked">
<button ng-click="get_val($event)">Click</button>

$scope.get_val= function(event)
{

}

Answer

Here you can add this to get value

var flag_item_val = $("input:radio[name=calender]:checked").val();