Dropdown list in AngularJS

If you want to create a dropdown list, using an array in AngularJS, then you should use the ng-option directive.

Example: Dropdown list in AngularJS.

<!DOCTYPE html>
<html>
     <script src="Scripts/angular.min.js"></script>
     <body>
          <div ng-app="myModule" ng-controller="myCtrl">
               <select ng-model="selectedNames" ng-options="x for x in EmpNames">
               </select>
          </div>
          <script>
               var app = angular.module('myModule', []);
               app.controller('myCtrl', function ($scope)
               {
                    $scope.EmpNames = ["Raj", "Shiva" ,"Digvijay"];
               });
          </script>
          <h4>
               <br/><br/><br/>
               <p>You can use ng-options directive to fill the dropdown list.</p>
          </h4>
     </body>
</html>


Output:
drop down list