zoukankan      html  css  js  c++  java
  • ionic3 浏览器端返回

    首屏component.ts文件中使用
    setupBrowserBackButtonBehavior() {
    // Register browser back button action(s) window.onpopstate = (evt) => { // Close menu if open // Close any active modals or overlays let activePortal = this.ionicApp._loadingPortal.getActive() || this.ionicApp._modalPortal.getActive() || this.ionicApp._toastPortal.getActive() || this.ionicApp._overlayPortal.getActive(); if (activePortal) { activePortal.dismiss(); return; } // Navigate back if (this.navCtrl.canGoBack()) { this.app.goBack(); }else { WeixinJSBridge.call('closeWindow'); } }; // Fake browser history on each view enter this.app.viewDidEnter.subscribe((app) => { history.pushState(null, null, ""); }); }

  • 相关阅读:
    基于jenkins+gitlab的自动集成环境的搭建
    函数指针与委托
    详解C#break ,continue, return (转)
    REST 与 web service 的比较
    Python
    python
    python
    python
    python 1.0
    python 0.0
  • 原文地址:https://www.cnblogs.com/changyaoself/p/9085887.html
Copyright © 2011-2022 走看看