I have the following markup in order to create a select
menu.
My model, devices
, contains 3 object (ex: pc1, pc2, pc3).
When select
is rendered I can see the list (collapsed) which has an empty value. When expanding the list I see the an empty line as first object and after my 3 objects.
My question, how to display the first element by default?
<select data-ng-model="devices"
name="devices"
data-ng-required="true"
data-ng-options="device.name for device in devices"></select>
EDIT:
Html emitted by angular is
<option value="?" selected="selected"></option>
<option value="0">pc1</option>
<option value="1">pc2</option>
<option value="2">pc3</option>