You can use a filter
along with the ! predicate that negates the search string:
div ng-repeat="item in items | filter:'!Red' | filter: '!Green'">{{item['flowers']}}</div>
So filter:'!Red'
removes anything that does have the string "Red" in it. Those results are passéd to filter: '!Green'
which removes any results that have the string "Green" in them.
Here's the relevant docs: http://docs.angularjs.org/api/ng.filter:filter
Performance Update
I was curious about the cost of filtering so I did this jsperf: http://jsperf.com/angular-ng-repeat-test1/2
I created 1,000 strings (items
) and then did 4 tests with the following results on my system:
1) Display all 1000 using DI 281,599 ops/sec
{{items}}
2) Display all 1000 using ng-repeat
(no-filter): 209,946 ops/sec 16% slower
<div ng-repeat="item in items"> {{item}}</div>
3) ng-repeat
with one filter 165,280 ops/sec 34% slower
<div ng-repeat="item in items | filter:filterString1"> {{item}}</div>
4) ng-repeat
with two filters 165,553, ops/sec 38% slower
<div ng-repeat="item in items | filter:filterString1 | filter:filterString2"> {{item}}</div>
This is certainly not a scientific test- I didn't do any controls and it's possible for things like caching to have influenced the results. But I think the relative performance is interesting.