Ionic 3 setRoot 不适用于 IOS 设备
Ionic 3 setRoot NOT working on IOS device
我正在 iPhone4 设备和其他一些 Android 设备上测试 hello world 应用程序。
离子版本 3.10.3
npm 版本 3.10.10
.
主要的 巨大 问题是 iPhone 设备,对 setRoot 的调用不起作用。 ("WORKS on Emulators")
void onGoClick(){
// this line **DOES NOTHING** and no error is thrown.
this.navCtrl.setRoot(HomePage);
// this line **DOES NOTHING** and no error is thrown.
this.app.getRootNav().setRoot(HomePage);
// this line **DOES NOTHING** and no error is thrown.
this.app.getRootNav().setRoot("HomePage");
}
这也不起作用
var root = this.appCtrl.getRootNav();
root.popToRoot();
root.setRoot( "HomePage" );
或不带引号 root.setRoot( HomePage );
.
但是如果我点击按钮两次它就会起作用....
好像缺少一些刷新....
此致。
问题是 iOS 版本,4 太旧了,如果你用 iPhone 6.
测试
你也可以这样运行试试
</p>
<pre><code>this.navCtrl.setRoot(DestinationPage).then( ()=>{
this.navCtrl.popToRoot().then( ()=> {
}).catch(err=>{
TError.handleException( "err 2: ", err );
});
}).catch(err=>{
});
此致。
我正在 iPhone4 设备和其他一些 Android 设备上测试 hello world 应用程序。
离子版本 3.10.3
npm 版本 3.10.10
.
主要的 巨大 问题是 iPhone 设备,对 setRoot 的调用不起作用。 ("WORKS on Emulators")
void onGoClick(){
// this line **DOES NOTHING** and no error is thrown.
this.navCtrl.setRoot(HomePage);
// this line **DOES NOTHING** and no error is thrown.
this.app.getRootNav().setRoot(HomePage);
// this line **DOES NOTHING** and no error is thrown.
this.app.getRootNav().setRoot("HomePage");
}
这也不起作用
var root = this.appCtrl.getRootNav();
root.popToRoot();
root.setRoot( "HomePage" );
或不带引号 root.setRoot( HomePage );
.
但是如果我点击按钮两次它就会起作用....
好像缺少一些刷新....
此致。
问题是 iOS 版本,4 太旧了,如果你用 iPhone 6.
测试你也可以这样运行试试
</p>
<pre><code>this.navCtrl.setRoot(DestinationPage).then( ()=>{
this.navCtrl.popToRoot().then( ()=> {
}).catch(err=>{
TError.handleException( "err 2: ", err );
});
}).catch(err=>{
});
此致。