title: Angular2 click and ngIF
body: <p>I want to use <code>(click)</code> function only when <code>ngIF</code> have value <code>True</code>.</p>
  
  <pre><code>&lt;tbody class="table-hover domains"&gt;
      &lt;tr *ngFor="let domain of domains" (click)="gotoDetail(domain.id)"&gt;
          &lt;td class="col-md-3"&gt;{{ domain.name }}&lt;/td&gt;
          &lt;td&gt;{{ domain.validated }}&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>So I need to add <code>ngIF</code> in <code>&lt;tr&gt;</code> tag as if <code>{{ domain.validated }}</code> value is <code>True</code>, then <code>(click)</code> function works, else it don't work or show message that variable have value <code>False</code>. How to do that?</p>