JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app>
<div ng-controller="CustomCtrl">
<label ng-repeat="user in users">
<input type="radio" name="radio" ng-model="radio.name" value="{{user.name}}" /> {{user.name}}
</label>
<br/>
{{radio.name}}
<br/>
<a href="javascript:void(0)" ng-click="saveTemplate()">Save</a>
</div>
</div>
JavaScript
function CustomCtrl($scope) {
$scope.radio = {
name: 'John'
}
$scope.users = [
{"name" : "John", "Year" : 18},
{"name" : "Tony", "Year" : 19}
];
$scope.saveTemplate = function() {
console.log($scope.gag);
};
}