Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy AngularJS Tutorial</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> </head> <body> <div ng-app="myApp" ng-controller="optionCtrl"> <h3>ng-options directive in AngularJS Tutorial</h3> <p>Select a Tutorial List</p> <select ng-model="value" ng-options="X for X in mystring"> </select> </div> <script> var app = angular.module('myApp', []); app.controller('optionCtrl', function($scope) { $scope.mystring = ["HTML", "CSS", "PHP"]; }); </script> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.