The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
<head>
<title></title>
</head>
<body>
<br>br>script type="text/javascript">
var app = angular.module('MyApp', [])
app.controller('MyController', function ($scope) {
$scope.Fruits = [{
Id: 1,
Name: 'Apple',
Selected: false
}, {
Id: 2,
Name: 'Mango',
Selected: true
}, {
Id: 3,
Name: 'Orange',
Selected: false
}];
});
<br><br>/script>
<br>div ng-app="MyApp" ng-controller="MyController">
<br>select>
<option value = "0" label = "Please Select"><<br>option>
<option ng-repeat="fruit in Fruits" value="{{fruit.Id}}" br>
ng-selected="{{ fruit.Selected == true }}">br>
{{fruit.Name}}
<br>/option>
</select>
</div>
</body>
</html>
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com