I'm trying to include certain options in my select box if certain expressions are true and I'm finding it adds the 1st one and not the 2nd one, and this only occurs when I use ng-options
I did try this with more complex expressions but reduced to to just ng-if="true"
to verify my suspicion , once I remove the ng-options
both if-ng options are added.
this is my users model
$scope.users = [{
"id": "123",
"description": "Tester",
"name": "Jane"
},
{
"id": "312",
"description": "Dev",
"name": "John"
}];
This is my simplified select
<select class="fullWidth" ng-model="name_model" ng-selected="name_model"
ng-options="user.name as user.description for user in users" required>
<option ng-if="true" value="">-- Please Select an Approver Type: --</option>
<option ng-if="true" value="">-- Please Select One: --</option>
</select>
Is this a bug, is it just not allowed or am I overlooking something. I have a JSFiddle that may explain better then I am here