title: How to set Angular Material mat-table cell conditionally?
body: <p>I have the following mat-table and there are Edit and Delete buttons for each record:</p>
  <pre><code>Name   |   Operation     |
  -------|-----------------|
  Bob    |   Edit | Delete |
  John   |   Edit | Delete |
  Willy  |   Edit | Delete |
  </code></pre>
  <p>The mat-table structure that I use is as shown below:</p>
  <pre><code>&lt;ng-container matColumnDef=&quot;operation&quot;&gt;
      &lt;th mat-header-cell *matHeaderCellDef&gt;Operation&lt;/th&gt;
      &lt;td mat-cell *matCellDef=&quot;let row&quot;&gt;
        &lt;ng-container *ngFor=&quot;let operation of operations&quot;&gt;
          &lt;button [disabled]=&quot;row.isActive&quot;&gt;
            &lt;mat-icon&gt;{{ operation.icon }}&lt;/mat-icon&gt;
          &lt;/button&gt;
        &lt;/ng-container&gt;
      &lt;/td&gt;
  &lt;/ng-container&gt;
  </code></pre>
  <p>I want to make enabled/disabled Delete button by sending a parameter (&quot;operation.isDisabled&quot;) from parent component and using a column value (&quot;row.isActive&quot;) in each row. However, as it is base table, I do not want to use specific values and try to send boty of these 2 conditions in config via &quot;operation&quot; variable like operation.condition = &quot;row.isActive &amp;&amp; operation.type === 'delete'&quot;. But unfortunately I could not do this via the folowing config (I can pass config, there is no problem. But I need to make it in if condition):</p>
  <pre><code>this.operation = [
    {
      type: 'delete',
      condition: 'row.isActive &amp;&amp; operation.type === &quot;delete&quot;'
    }
  ];  
  </code></pre>
  <p>So, is it possible to manipulate a single button usimng these 2 conditions sent from parent component as string, etc?</p>