0

Please help me How can i disable paryicular option in my js code This is My code

 <select  ng-options="bus.id as bus.BU for bus in bustatuses"
     options-disabled="bus.value==4 for bus in bustatuses">
                                    </select>

Here i wana to hide value=4 option

Thank you

ems ems
  • 13
  • 2

1 Answers1

0

You can try something like the below code, also please check this plunker link for your scenario working example.

Template:

<select ng-model="busId">
      <option value="">Select Bus</option>
      <option ng-repeat="bus in bustatuses" ng-disabled="bus.id===4" value="bus.id">{{bus.BU}}</option>
</select>
Immanuel Kirubaharan
  • 1,094
  • 1
  • 11
  • 17