The largest Interview Solution Library on the web



Warning: include(../../menu/leftMenu/angularjs-repeat.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-repeat.php on line 36

Warning: include(../../menu/leftMenu/angularjs-repeat.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-repeat.php on line 36

Warning: include() [function.include]: Failed opening '../../menu/leftMenu/angularjs-repeat.php' for inclusion (include_path='.:/opt/alt/php53/usr/share/pear:/opt/alt/php53/usr/share/php') in /home/javatech/public_html/question/angularjsexample/angularjs-repeat.php on line 36
« 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