Is there a way to disable an option
in a select
element when we populate options
with ng-options in AngularJS?
Like this: http://www.w3schools.com/tags/att_option_disabled.asp
You can do it by adding ng-disabled
to each <option>
tag, but is there a way to do it if we are using the ng-options
directive in the select
tag?
<select class="form-control input-sm" ng-model="list" ng-options="value.label for value in lists"> </select>
And i want to disable the selected option but just after clicking on a button – Outfit