【发布时间】:2017-07-05 20:31:26
【问题描述】:
我必须在我的应用中包含一个外部网页,所以我为此使用了 iframe。 现在我想在 iframe 加载时显示加载动画。这很好用,但我不知道当 iframe 准备好时如何关闭动画。 我无法在 iframe 中编辑页面的代码。
这是我在 TypeScript-File 上的代码:
ngOnInit() {
this.presentLoading();
}
presentLoading() {
let loading = this.loadingCtrl.create({
content: 'Please wait...'
});
loading.present();
}
和 HTML 文件
<ion-content>
<iframe name="chatFrame" src="http://..."></iframe>
</ion-content>
【问题讨论】:
-
我相信这个问题可能已经在这里得到了答案:Checking Load State on an Iframe
标签: html angular iframe typescript ionic-framework