title: Toggle class between two buttons in Angular2
body: <p>I am using angular 2 and I have two buttons I want toggle class between two buttons but. Below is my code</p>
  
  <pre><code>&lt;button class="btn rounded" [ngClass]="{'btn-default': !clicked, 'btn-primary': clicked}" (click)="clicked = !clicked"&gt;
                                      &lt;i class="fa fa-long-arrow-up"&gt;&lt;/i&gt;
                                  &lt;/button&gt;
                                  &lt;button class="btn rounded" [ngClass]="{'btn-default': !clicked, 'btn-primary': clicked}" (click)="clicked = !clicked"&gt;
                                      &lt;i class="fa fa-long-arrow-down"&gt;&lt;/i&gt;
                                  &lt;/button&gt;
  </code></pre>
  
  <p>My problem is I want to toggle class but at time only one button can select and other condition is both buttons can be deselect. On click of one button other button should be deselect and once you click on selected button that button should be deselect and I want to do this only using buttons. Please help</p>