How to make a blank screen to page until it's fully initialized?


#1

i want the page to have a blank screen until it’s fully initialized and got it’s fully responses
how can i make that??


#2

Don’t, use a Skeleton Screen: https://blog.ionicframework.com/improved-perceived-performance-with-skeleton-screens/


#3

Html file:

<ion-content *ngIf="pageLoaded">
 <!-- all your stuff -->
</ion-content>

ts file:

...
@IonicPage()
@Component({
  selector: 'page-home',
  templateUrl: 'home.html',
})
export class HomePage {
    pageLoaded:boolean = false;

    constructor() {
       this.loadData();
    }

   loadData() {
       ... all your code
       this.pageLoaded = true;
   }
}