I use this code in order to set the background-color:
<ion-grid style="margin-left:2px;margin-right:2px;margin-top:5px;">
<ion-row *ngFor="let scheduleRecordDayCompendium of scheduleRecordDayCompendiums; let i = index"
[style.color]="getLineColor(scheduleRecordDayCompendium)">
<ion-col>
This is the getLineColor function:
getLineColor(scheduleRecordDayCompendium) {
switch(scheduleRecordDayCompendium.day) {
case 'SATURDAY':
return '#00f';
case 'SUNDAY':
return '#f00';
}
return '#000';
}
with [style.color] it works fine but how can I make it work with [style.backgound-color]?