angular - 如何检查是否从 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++";
}
}
解决方案
推荐阅读
- swift - Swift Visual Format Language 中间四个按钮
- php - 网站宕机了!更改了 word press 的主题
- firefox - Google Drive Picker apiv3 在授权后关闭
- django - Django全局变量存储不可变对象
- python - Ansible Python API 连接到 Cisco 设备
- c# - 样式触发器属性不会更改 XAML 中元素的宽度
- android - 当我播放第二个视频时,仅显示第一个视频的冻结帧并播放音频
- java - 浏览器重启后恢复浏览器会话(重复 Cookie 问题)
- html - 在 Web 表单上显示实时 SQL 数据
- android - 在 Vuforia 中取消隐藏操作栏/导航栏 - Unity 项目