Using & (bitwise AND operator) in Angular ng-if expressions
<p>I can't get the <code>&amp;</code> operator to work in an Angular <code>ng-if</code> expression (to use with some bit flags). Suppose we have some HTML like this:</p>

<pre><code>&lt;div ng-if="value &amp; 2"&gt; &lt;/div&gt;
</code></pre>

<p>If <code>value</code> equals 3, then the bitwise operation should return 2 and thus a true value.</p>

<p>However, Angular throws a <code>Syntax Error</code> exception every time. Is the operation not allowed? Or am I doing something wrong?</p>

<p>Link to the <a href="http://plnkr.co/edit/Yz2qESo1dSGp35O1dxm8?p=preview" rel="noreferrer">plunker</a>.</p>

<p>Edit: I already resolved my issue by using a simple function that does the job:</p>

<pre><code>$scope.checkFlag = function(value, flag){
   return value &amp; flag;
}
</code></pre>

<p>But I really don't like this solution. Is there a way to use it in an <code>ng-if</code> (without using the function, obviously)?</p>