title: Toggle colors on multiple buttons
body: <p>How can I toggle background color on multiple buttons.( reference images )</p>
  
  <p>I have set of buttons. Once user click on any button it change the background color and if click again on same button other button the first clicked button reset to original color and change the 2nd click button.</p>
  
  <p><strong>code</strong></p>
  
  <pre><code>&lt;span class="input-group-btn"&gt;
  
                      &lt;button
                        class="btn btn-sm btn-primary mr-2"
                        (click)="selectToday('approved')"
                      &gt;
                        Select Today
                      &lt;/button&gt;
                      &lt;button
                        class="btn btn-sm btn-primary mr-2"
                        (click)="selectWeek('approved')"
                      &gt;
                        To Current Week
                      &lt;/button&gt;
                      &lt;button
                        class="btn btn-sm btn-primary mr-2"
                        (click)="selectMonth('approved')"
                      &gt;
                        To Current Month
                      &lt;/button&gt;
                      &lt;button
                        class="btn btn-sm btn-primary mr-2"
                        (click)="AllTime('approved')"
                      &gt;
                        All Time
                      &lt;/button&gt;
                    &lt;/span&gt;
  </code></pre>
  
  <p>Can anyone give me clue how to bind the class with each other</p>
  
  <p><a href="https://i.stack.imgur.com/DFZ8T.png" rel="nofollow noreferrer">image</a></p>