I need to filter the messages data to exclude certain messages based on the userid. For example, in the scenario below, only messages from Paul (userid: 11) & Kate (userid:12) are displayed.
What I want to achieve is to filter out more than just one userid. For instance:
{userid:["!10", "!11"]};
This code should only display messages from userid 12 (in this case).
Check out the Plunker example: http://plnkr.co/edit/464FVab41YoV2BGFkgWt?p=preview
$scope.msgs = [{name:"John", userid:10, text:"Hello"}, {name:"Paul", userid:11, text:"hi"}, {name:"Kate", userid:12, text:"Hey"}];
$scope.filter = {userid:"!10"};
<div ng-repeat="msg in msgs | filter:filter">
{{msg.name}} ({{msg.userid}}) : {{msg.text}}
</div>