Lately, I've been dealing with AngularJS and X-editable and one thing that has been troubling me is the fact that the select option always includes an empty first child.
Here's the HTML
<span editable-select="curuser.roles" e-name="roles" e-ng-options="role as role.name for role in roles">
{{ showRoles() }}
</span>
This is how the output HTML looks like:
<select name="roles" ng-options="role as role.name for role in roles">
<option value="?" selected="selected"></option>
<option value="0">Admin</option>
<option value="1">Company</option>
<option value="2">Manager</option>
</select>
What steps do I need to take to remove this empty option?
You can view a working example on JSFiddle