You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
In Angular, you can specify a placeholder value for a <select> by doing something like so:
<select ng-options="o.name for o in options" ng-model="model">
<option value="">Please choose</option>
</select>
This still works, however even when you choose an option in the list, the 'Please choose' placeholder still shows. To get around this, you could use an ng-if on the placeholder <option> to hide the option if a model value was selected, like so:
<select ng-options="o.name for o in options" ng-model="model">
<option ng-if="!model" value="">Please choose</option>
</select>
However this no longer works in Angular 1.4, the placeholder no longer shows and the entire list is cleared if you choose one of the other options.