Created
October 18, 2014 07:14
-
-
Save dkumar431/a75cb1d9c449c26c7123 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 = {fav: "Java"}; | |
} | |
]) | |
</script> | |
</head> | |
<body ng-controller="sampleCtrl"> | |
<ul> | |
<li ng-repeat="skill in skills"> | |
<input type="radio" name="sudents" ng-model="mySkill.fav" ng-value="skill">{{skill}} | |
</li> | |
</ul> | |
Selected Value is: {{mySkill.fav}} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment