I have a dropdown list and I'm using AngularJS as the frontend framework. However the first value in dropdownlist is always empty. Can anyone explain to me what happened? where I need to change? Thanks!
here is the html
<div class="input-control select" ng-controller="democtrl">
<select ng-model="selectedOption">
<option selected>Select the option</option>
<option value="ip">IP</option>
<option value="host">Host</option>
</select>
{{selectedOption}}
</div>
here is the js code:
angular.module('demo')
.controller('democtrl', ['$scope', function ($scope) {
$scope.selectedOption = "test";
}]);