Computer >> Computer tutorials >  >> Programming >> Javascript

Not able to get the value of radio select setting dynamically in AngularJS


To get the value of radio select, add [$index] to each ng-model like the following:

<td><input type = "radio" ng-model = "classes.satisfies[$index]" value = "Country1"> India</td>
<td><input type = "radio" ng-model = "classes.satisfies[$index]" value = "Country 2"> US</td>

The above would give you the result dynamically in AngularJS.