我想创建一个按钮来检查是否安装了应用程序。 如果安装了该应用程序,则该应用程序将启动,否则它将下载该应用程序。
例如。记事本++
在 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++";
}
}