title: Angular 8 enable/disable button based on table selection
body: <p>I want to enable/disable a button based on whether any item (it's with checkboxes on each row) from the table has been selected or not.
  Firstly, the button is disabled. If any row from the table has been selected, it automatically enables. The problem is when I deselect anything, the button remains enabled, it does not come back to the disable state.</p>
  <p>This is my code that's been working this way:
  (HTML)</p>
  <pre class="lang-html prettyprint-override"><code>&lt;button class=&quot;btn btn-primary&quot; mat-button [disabled]=&quot;disableBtn&quot;&gt;
  </code></pre>
  <p>(TS)</p>
  <pre class="lang-js prettyprint-override"><code>if (this.selectedFromTable.length &gt; 0) {
    this.disableBtn = false;
  } else {
    this.disableBtn = true;
  }
  </code></pre>