AngularJS: Filter ng-options not having specific values

AngularJS NOT Filter

<select ng-model="test" ng-options="c as c.label group by c.type for c in columns
    | filter:{ type : '!field' }
    | filter:{ type : '!map' }">
</select>

Fiddle

From the docs:

“…The predicate can be negated by prefixing the string with !.”

“A pattern object can be used to filter specific properties on objects contained by array. For example {name:”M”, phone:”1″} predicate will return an array of items which have property name containing “M” and property phone containing “1”…”

Leave a Comment