Hello ,
I’m trying to change the color of text in Ion-select-option with ngClass (Ion-select : interface=“action-sheet”)
but without any success.
<ion-item>
<ion-label>{{'TIME'| translate}}</ion-label>
<ion-select color="green" formControlName="canteen" (ionChange)="changeTime()" interface="action-sheet" style="max-width: 100%" [cancelText]="cancel">
<ion-select-option *ngFor="let time of crns" value="{{time.idct}}" [ngClass]="{
'ion-select-red': time.subs<=0 ,
'ion-select-green': time.subs>0
}" [disabled]="time.subs<=0">
{{time.creneau}} </ion-select-option>
</ion-select>
</ion-item>
.ion-select-red {
--color: var(--ion-color-danger);
}
.ion-select-green {
--color: var(--ion-color-green);
}
Any help please.
1 post - 1 participant