Angular: Empty Fiddle

http://angularjs.org/

by gogirl

HTML

<div ng-controller="MyCtrl">
    <select ng-model="form.type" required="required"
  ng-options="option.value as option.name for option in typeOptions" >
    <option style="display:none" value="">select a type</option>
</select>
    form.type={{form.type}}
</div>

JavaScript

var myApp = angular.module('myApp',[]);


function MyCtrl($scope) {
    
    $scope.typeOptions = [
    { name: 'Feature', value: 'feature' }, 
    { name: 'Bug', value: 'bug' }, 
    { name: 'Enhancement', value: 'enhancement' }
    ];
    
    //$scope.form = {type : $scope.typeOptions[0].value};
}