The largest Interview Solution Library on the web


« 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