Skip to content

Instantly share code, notes, and snippets.

@dkumar431
Last active August 29, 2015 14:07
Show Gist options
  • Save dkumar431/269d5e18f934394bf104 to your computer and use it in GitHub Desktop.
Save dkumar431/269d5e18f934394bf104 to your computer and use it in GitHub Desktop.
<html ng-app="sampleApp">
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<script type="text/javascript">
var sampleApp = angular.module("sampleApp", []);
sampleApp.controller('sampleCtrl', ['$scope',
function($scope) {
$scope.skills = ["Java", "C", "C++", "PHP", "ColdFusion"];
$scope.mySkill = "Java";
}
])
</script>
</head>
<body ng-controller="sampleCtrl">
<ul>
<li ng-repeat="skill in skills">
<input type="radio" name="sudents" ng-model="mySkill" ng-value="skill">{{skill}}
</li>
</ul>
Selected Value is: {{mySkill}}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment