首页 > 解决方案 > 如何检查是否从 Angular 安装了应用程序

问题描述

我想创建一个按钮来检查是否安装了应用程序。如果安装了应用程序,应用程序将启动,否则它将下载该应用程序。

例如。记事本++

在 component.html 中

<button (click)="launchNotepad()">Click ME</button>

在组件.ts

launchNotepad(){
   if(){//check if Notepad++ is installed
      //launch Notepad++
   }
   else{
      window.location.href = "link_to_download_Notepad++";
   }
}

标签: angularwindowsweb-applications

解决方案


推荐阅读