Angular 2 - Bindings cannot contain assignments : <p>I need to give a class to a <code>&lt;tr&gt;</code> if a property of item has the same value as a property from an object in an array.</p>

<p>Here's the <strong>code</strong> I currently have:</p>

<pre><code>&lt;tr *ngFor="let item of closingDayGroupsList" [class.inactive]="definitionDetails.Groups.filter(i =&gt; i.AbsenceReservationGroupID === item.ID).length &gt; 0"&gt;
</code></pre>

<p>however now I receive the <strong>error</strong>:</p>

<pre><code>Bindings cannot contain assignments
</code></pre>

<p>I'm not sure if what I'm doing is bad practice, or if I'm just making syntax errors. </p>

<p>This is the only way I know to achieve what I want, but it's not working</p>
