Ratna Raju Ratna Raju - 2 years ago 60
AngularJS Question

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

I have select tag like this

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

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