Official tutorial of angularJS present you how to make a simple filter tied to an ng-repeat
element according to the value of ng-model
of an input element. Here is an example:
<input ng-model="filterpost"/>
<ul>
<li ng-repeat="post in posts | filter:filterpost" >{{ post.title }}</li>
</ul>
The official API of the filter $filter
mention that it's possible to negate the expression but if you try <li ng-repeat="post in posts | filter:!filterpost" >
you will notice that it does not seem to work. This is just because you have ommited the quote. So the right code is :
<input ng-model="filterpost"/>
<ul>
<li ng-repeat="post in posts | filter:'!'+filterpost" >{{ post.title }}</li>
</ul>