title: Change button color on click inside ngFor
body: <p>I am generating segment buttons conditionally, how can I change the button color which was clicked:</p>
  
  <pre><code>&lt;ion-segment *ngIf="menu" [(ngModel)]="apps"&gt;
           &lt;ion-segment-button *ngFor="let item of menu; let i = index" value="{{item .key}}"
                                [ngClass]="{active: i === activeIndex}" (click)="changeTab(item.key); setActiveIndex(i)"
                                style="display:block;" &gt;
  
              {{item?.name}}
  
            &lt;/ion-segment-button&gt;
          &lt;/ion-segment&gt;
  </code></pre>
  
  <p>If I apply <code>[ngStyle]="{'background-color': this.buttonColor}"</code> on <code>ion-segment-button</code> then it reflect on all the button, I just want to change the color of the clicked one</p>