如何检查是否从 Angular 安装了应用程序

时间:2021-06-24 11:04:37

标签: angular windows web-applications

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

例如。记事本++

在 component.html 中

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

在 component.ts 中

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

0 个答案:

没有答案