The largest Interview Solution Library on the web



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

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

Warning: include() [function.include]: Failed opening '../../menu/leftMenu/angularjsdropbox.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-dropbox.php on line 36
« Previous | 1 | 2 | 3 | Next »

Fill a DropDown list using the ng-options directive.

<html>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<select ng-model="selectedName" ng-options="x for x in names">
</select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = ["Delhi", "Pune", "Mumbia","Hyderabad","Noida"];
});
</script>
<p>Fill a DropDown list using the ng-options directive.</p>
</body>
</html>
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com