a8m / angular-filter

Bunch of useful filters for AngularJS (with no external dependencies!)
https://github.com/a8m/angular-filter
MIT License
2.93k stars 332 forks source link

Getting false back on 'Every' Filter #243

Closed westerncj closed 7 years ago

westerncj commented 7 years ago

I can't seem to get the every filter to work. I keep getting false back.

Here is an example. I have a collection like this:

var myCollection = [{ Id: 1, selected: true }, { Id: 2, selected: true }]
{{ myCollection | every: selected == true }}

I've also tried {{ (myCollection | every: {selected: true}) }}, but I still get false.

a8m commented 7 years ago

Hey @westerncj The expression should be type string. I fixed the example in the README, see every example.

I'm gonna close this issue, but feel free to open it if you still have issue with that.