How to check if something is in array from ng-class
<p>I want to do something like:<br></p>

<pre><code>var list = [1,2,3,4,5]
if(2 in list){
  return true
}
</code></pre>

<p>from a <code>ng-class</code>, so I tried:
<br><br>
<code> ng-class="this.id in list ? 'class-1' : 'class-2' "></code></p>

<p>But doesn't worked, throws an error</p>

<pre><code>Syntax Error: Token 'in' is an unexpected token at ...
</code></pre>