9blue
9blue

Reputation: 4753

How to filter obj that doe not have certain value in angular?

I want to do ng-repeat on an array of objects. I want to the object with color property not equals to "black" to display. How would I do it?

Upvotes: 0

Views: 40

Answers (1)

Mathew Berg
Mathew Berg

Reputation: 28750

Next time... show a little bit of work:

<div data-ng-repeat="thing in stuff | filter:{'color': '!black'}">
    {{ thing}}
</div>

JSFiddle with example: http://jsfiddle.net/muwgsxbw/

Upvotes: 3

Related Questions