I want to change ion-loading style using cssClass ,my code as follow:
loading.page.ts :
@Component({
selector: \'app-loading\',
templateUrl:
Rano Paimin, your solution doesn't work, so I'll improve your answer:
I'm Using IONIC 4
this.myLoading = await this.loadingCtrl.create({
spinner: null, -> here you can add others spinners ou set null
remove this attribute -> message: ' ',
cssClass: 'custom-loading'
});
await this.myLoading.present();
at theme/variables.scss
ion-loading.custom-loading {
.loading-wrapper {
background: #ffffff url("assets/gif/loading.gif") no-repeat center;
}
}
If you want change dimensions you can change these properties:
background-size: 100px 100px; /* to change dimension of background */
padding-top: 36px; /* padding top of white square */
padding-bottom: 36px; /* padding bottom of white square */
border-radius: 0.8rem; /* border-radius white square */
I hope that helps you.