title: Check if array contains value in angularjs
body: <p>On client side I have $scope.loggedInUser, which refers to mongoose user schema. Another schema I'm using is a conversation schema. Every user can join conversation, in that case he will be added to conversation.participants array, which is defined like that:</p>
  
  <pre><code>var conversationsSchema = new Schema({
      participants: {type: Array, default: []}
  });
  </code></pre>
  
  <p>I want to display only conversation with current user (i.e. loggedInUser) in participants array. I tried</p>
  
  <pre><code>ng-repeat="conversation in conversations" ng-if="conversation.participants.indexOf(logged_in_user) &gt; -1"
  </code></pre>
  
  <p>but I dodn't see any. How can I check if element exists in array in ng-if (or generally in angular) correctly?</p>