title: Angular changing button class css color by calling function issue
body: <p>In my angular code, I am trying to assign a css color to my button and need to call a ts function to return the css class name.</p>
  
  <p>I tried the following code </p>
  
  <pre><code>&lt;button style="height: 10%" class="getColor(days.date)"&gt;{{days.date}}&lt;/button&gt;
  </code></pre>
  
  <p>In my ts code, </p>
  
  <p>I have something like this</p>
  
  <pre><code>getColor(item: any) {
  
  
      return 'bg-green'; // define in my style.css
    }
  </code></pre>
  
  <p>I quickly noticed that class="getColor()" does not even call the function.</p>
  
  <p>I thought about ngIf and ngTemplate but not sure if that will work. I using setting to 4 different colors as indicators like default gray, blue, red, and yellow. </p>
  
  <p>Any help is appreciated. Thanks.</p>