多级页面返回到指定的页面
export class Page { @ViewChild(Navbar) navBar: Navbar; ① ionViewDidLoad() { ② this.navBar.backButtonClick = this.backButtonClick; ③ } backButtonClick = (e: UIEvent) => { // do something this.navCtrl.push(UserinfoPage); } }
经测试,大功告成
多级页面返回到指定的页面
export class Page { @ViewChild(Navbar) navBar: Navbar; ① ionViewDidLoad() { ② this.navBar.backButtonClick = this.backButtonClick; ③ } backButtonClick = (e: UIEvent) => { // do something this.navCtrl.push(UserinfoPage); } }
经测试,大功告成