title: Change background color of the button on click
body: <p>I have a button that changed its text to <code>enable</code> and <code>disable</code> on click.</p>
  
  <p>How can I also change the button color,</p>
  
  <p>For e.g. change to Green on <code>enable</code> and Red on <code>disable</code></p>
  
  <pre><code>&lt;button (click)="enableDisableRule()"&gt;{{status}}&lt;/button&gt;
  </code></pre>
  
  <p>Component</p>
  
  <pre><code>toggle = true;
  status = 'Enable'; 
  
  enableDisableRule(job) {
      this.toggle = !this.toggle;
      this.status = this.toggle ? 'Enable' : 'Disable';
  }
  </code></pre>
  
  <p>Any help is appreciated. Thanks</p>