I am using angularjs v1.
I would like to have exclusive radio buttons in each table row. Each row will look something like below;
The radio buttons should be exclusive. In other words, only 1 of the buttons can be selected at any one time. When the send radio button info button is pressed, information regarding which radio button is selected should be sent to the angularjs controller.
Here is my html code;
<div ng-controller="RadioButtonsCtrl">
<table class="table table-hover data-table sort display">
<thead>
<tr>
<th class="Off_">
Off
</th>
<th class="On_">
On
</th>
<th class="Toggle_">
Middle
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in radio_button_items">
<td><input type="radio" ng-model="model.select_off"></td>
<td><input type="radio" ng-model="model.select_on"></td>
<td><input type="radio" ng-model="model.select_middle"></td>
<td>
<button ng-click="SendInfo(item)">Send radio button info</button>
</td>
</tbody>
</table>
Here is the controller code;
.controller('RadioButtonsCtrl', ['$scope',
function ($scope) {
$scope.SendInfo = function (row) {
console.log(row);
}
}])

nameprop to each radio button in a row