我想使用URL方案打开我的ios应用程序.我可以用这个打开app.但我想如果没有安装应用程序,那么应该打开应用程序商店,用户可以下载应用程序.这可能吗?我怎样才能做到这一点?
编辑 逐步解释问题:
谢谢
我使用Ionic 3开发了一个PWA(基于Tab).它在Android浏览器中按下硬件后退按钮或浏览器的后退按钮之前工作正常.如果它从主屏幕运行,按回硬件将关闭应用程序.如果应用程序在android中运行chrome(仅在chrome中测试),硬件返回或浏览器后面将重新加载PWA的第一页,而不是之前访问过的页面.如何在Ionic 3 PWA中处理这些事件?
我正在为所有页面使用延迟加载.
到目前为止我尝试了什么:
按照jgw96的评论在这里,我想IonicPage将处理导航本身.但它没有用.
使用platform.registerBackButtonAction,但它不适用于PWA.
根据Webruster在Answers中的建议,在app.component.ts中尝试了代码.但没有变化.
发布代码:
import { Component, ViewChild } from '@angular/core';
import { Nav, Platform, AlertController, Alert, Events, App, IonicApp, MenuController } from 'ionic-angular';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage:any = 'TabsPage';
constructor(public platform: Platform,
public alertCtrl: AlertController, public events: Events,
public menu: MenuController,
private _app: App,
private _ionicApp: IonicApp) {
platform.ready().then(() => {
this.configureBkBtnprocess ();
});
}
configureBkBtnprocess() {
if (window.location.protocol !== "file:") {
window.onpopstate …Run Code Online (Sandbox Code Playgroud)