[英]Show Ionic3 LoadingController partially
We know that the LoadingController in ionic3 is a fullscreen loading. 我们知道ionic3中的LoadingController是全屏加载。 Is it posiible user the LoadingController for partial loading like loading only a list in the screen of a card in the screen?
用户是否可以通过LoadingController进行部分加载,例如仅加载屏幕中的卡片屏幕中的列表?
ion-spinner { position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px; margin: auto; z-index: 9; }
<ion-content> <ion-spinner></ion-spinner> </ion-content>
Yes, You can. 是的你可以。 You need to create a custom loader for that.
您需要为此创建一个自定义加载程序。
Here is an example of the doc 这是文档的示例
presentLoadingCustom() {
const loading = this.loadingCtrl.create({
spinner: 'hide',
content: `
<div class="custom-spinner-container">
<div class="custom-spinner-box"></div>
</div>`,
duration: 5000
});
loading.onDidDismiss(() => {
console.log('Dismissed loading');
});
loading.present();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.