-
Notifications
You must be signed in to change notification settings - Fork 27.4k
$filter does not work with empty string #7890
Comments
This works as documented --- if you want to do an exact string match with the filterFilter, you should use a predicate function which performs the comparison for you. Obviously, any string will "contain the empty string". You can also write a custom filter which performs exact string searches |
I finally got the answer and was beaten :) |
Sorry for the bad report, I feel stupid right now... |
It took me a lot of digging to validate and find out why, i wouldnt feel stupid! the first 'filter' in the menu isn't the actual filter/filter manual page, its just a vague service reference, which didn't help me with the issue at all! |
You can also write a custom filter which performs exact string searches I was confused by this too. The documentation doesn't say "contains" is what tricked me. It says
I bolded the key phrase of the paragraph. I didn't know that "match" was the same as "contains". |
It is not the same. The thing is that
If someone can come up with a clearer wording, PRs are always welcome 😃 |
@gkalpak |
See demo: http://plnkr.co/edit/D9zi5h?p=preview
Tested with AngularJS 1.2.18 and 1.3.0-beta.13
The text was updated successfully, but these errors were encountered: