<select> placeholder with angular/bootstrap not working

unludo picture unludo · Jun 11, 2014 · Viewed 53.7k times · Source

I would like to have a select with a placeholder in angularjs with bootstrap. The solutions I have found do not work with angular

Here is my angular markup:

<select ng-model="myModel" 
     ng-options="p.name for p in ..."
     class="form-control list-selector required">
   <option value='' disabled selected>Please Choose</option>
</select>

If someone has a working solution...

thanks :)

Answer

Diana Nassar picture Diana Nassar · Jun 11, 2014

You need to add an empty option to your select:

<option value="">- Please Choose -</option>

Here is a working example: http://jsfiddle.net/DianaNassar/FShdc/