@AKLingesan wrote:
Hi, I’m trying to add a delete button with the ion-select-option, but isn’t working, Whenever try to click the delete button it shows the select option values.
<ng-container formArrayName="coordinator"> <ion-item *ngFor="let coord of coordinator.controls; let i = index" [formGroupName]="i"> <ion-label position="floating">Coordinator {{i+1}}</ion-label> <ion-select formControlName="name" (ionChange)="coordinatorData($event)"> <ion-select-option [value]="coord.name" *ngFor="let coord of coords">{{coord.name}}</ion-select-option> </ion-select> <ion-button *ngIf='i>0'(click)='removeCoord(i)' slot = 'end'>x</ion-button> </ion-item> <ion-button (click)='addNewCoord()'>Add Coord</ion-button> </ng-container>
Posts: 1
Participants: 1