To quickly check this out, we will implement the overlay loading bar on the home page of our current app. When a user lands on this tab, we will programmatically trigger the loading popup, and depending on the platform, we will customize the look and feel of the component to show that components can be customized as we please.
Update example13/src/pages/home/home.ts as mentioned in the following code:
import { Component } from '@angular/core';
import { LoadingController } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public loadingCtrl: LoadingController) {
this.presentLoading();
}
presentLoading() {
let loader = this.loadingCtrl.create({
content: "Please wait...",
duration: 3000
});
loader.present();
}
}
We have defined a...