I ng-option
element in my page.
Here how it looks in template:
<select ng-model="selectedItem" ng-options="item.name for item in items track by item.id"></select>
In controller:
$scope.selectedItem = {};
$scope.items = [{name: 'one', id: 30 },{ name: 'two', id: 27 },{ name: 'threex', id: 50 }];
In my project I get scope items from some lookup table.
I need to add to ng-select this element with value -1
:
<option value="-1">- manual -</option>
And it looks like that:
<select ng-model="selectedItem" ng-options="item.name for item in items track by item.id">
<option value="-1">- manual -</option>
</select>
Here is Plunker.
But I don't see in view manual
option.
Any idea why I cant see manual option in the view?