I've been trying to figure out how to exclude a value from an array generated by ng-options using filters with no luck.
The array generated by the snippet below generates the following array ["publicExtra","public","private"] I want to exclude "public" from the options. Thanks in advance.
<select ng-model="elb_instance.use_vpc"
ng-options="('Subnet: ' + type) for type in elb_instance.vpc_names_with_subnet_types_for_elb[elb_instance.vpc_name]"
ng-disabled="!elb_instance['new_record?']"
ng-show="elb_instance.vpc_name"
id="use_vpc"
class="input-medium">
You can do this easily using
filterand using!before search string to negate the predicate like:But note that this ignores both
public&publicExtraas basic filter does not do exact match. For that, we will also need to passtruefor thecomparatorlike: