I followed the official documentation and my code is like below:
let alert = this.alertCtrl.create({
title: 'Alert',
subTitle: 'Subtitle',
message: 'This is an alert message.',
buttons: ['OK'],
cssClass: 'profalert'
});
alert.present();
and my CSS:
.profalert{
color:#e7333c;
background-color: red;
}
But this is not changing the alertbox color. I also tried alert .setCssClass('profalert');
I already checked this