Ratna Raju Ratna Raju - 1 year ago 44
AngularJS Question

Hide option which is present in the array object (Angularjs)

I have select tag like this

<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>


i want to hide the options which are present in the following array object as a priority.

$scope.items = [{itemname:abc, priority:2},{itemname:def,priority:4}]

Answer Source

You can simply call a method to check for visibility of option via ng-show or ng-hide.

See this Fiddle.

further your itemname should be string, like itemname:'abc'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download