1

I can't seem to find the way to filter my options in my drop down.

<div>
    <select>
        <option ng-repeat="draw in draws| filter:{draw.perform == true && automatic == false}">

        </option>
    </select>

</div>

data looks like :

{
   automatic: true,
   date: 1417388400000,
   drawQuantity: 0,
   number: 1,
   offer: {
      image: "/"test,
      number: 1
   },
   perform: true
}

I get the data from firebase, that's why i need to do filtering on frontend. If anyone was wondering.

1 Answer 1

1

Your syntax is incorrect. Try this instead:

ng-repeat="draw in draws| filter:{perform: true, automatic: false}"

If you need to filter by property values you should use object notation.

Sign up to request clarification or add additional context in comments.

2 Comments

Actually found out that I should use ng-options instead of an option with ng-repeat :) But thanks for the help, your solution did work as well, so I'll put it as correct one
Geez, can't believe I didn't notice that you were using ngRepeat instead of ngOptions. But the principle of using filter object is the same anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.