简体   繁体   English

如何从 Angular 应用程序打开桌面应用程序?

[英]How to open a desktop app from Angular application?

I have an Angular App running in my browser (Chrome, IE and Firefox).我的浏览器(Chrome、IE 和 Firefox)中运行着一个 Angular 应用程序。 On Click of a button , it should open a local app, which is a stand alone desktop app, already installed in my system.单击按钮时,它应该打开一个本地应用程序,它是一个独立的桌面应用程序,已安装在我的系统中。

First of all, Is it possible?首先,这可能吗? Will Angular / Browser allow such actions? Angular/Browser 会允许这样的操作吗?

If possible, which all are the possible ways?如果可能,所有可能的方法是什么?

Can somebody help me?有人可以帮助我吗?

It is possible to do that using protocols, by default browser supports file:// and some other custom protocols that opens up the files in the browser window, applications like slack and discord use custom protocols that are built using electron into the applications and in the machine registry that chrome can trigger to open up an application from the web application.可以使用协议来做到这一点,默认情况下,浏览器支持file://和其他一些在浏览器窗口中打开文件的自定义协议,像 slack 和 discord 这样的应用程序使用使用电子构建的自定义协议到应用程序和chrome 可以触发以从 Web 应用程序打开应用程序的机器注册表。

https://glebbahmutov.com/blog/electron-app-with-custom-protocol/ https://glebbahmutov.com/blog/electron-app-with-custom-protocol/

Yes, it is possible via calling application protocol, registered at the time of installation time in our system.是的,可以通过调用应用程序协议,在安装时在我们的系统中注册。

Example:例子:

You can open postman app installed via snapcraft from the browser您可以从浏览器打开通过 snapcraft 安装的邮递员应用程序

syntax:句法:

postman:///邮差:///

Note: You should know the registered protocol of the app and the app should not portable注意:您应该知道应用程序的注册协议,并且应用程序不能移植

via HTML:通过 HTML:

<a href="postman:///">Open Postman</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 Java 桌面应用程序代码打开新的浏览器窗口? - how to open new browser window from java desktop application code? 如何为现有的Web应用程序创建桌面应用程序? - How to create a desktop app for the existing web application? 从网页链接打开客户端的桌面应用程序 - Open client's desktop application from web page link 如何在单击桌面应用程序中的按钮时打开 gmail/outlook 撰写屏幕? - How to open a gmail/outlook compose screen on clicking a button in Desktop application? 使用Applet使用桌面应用程序打开文件 - Open a File with Desktop Application with Applet 如何在Java中将桌面应用程序转换为Web应用程序 - how to make my desktop application to web app application in java 如何从我的网站触发桌面应用程序? - How to trigger a desktop application from my website? 从 Java 桌面应用程序为 Android 应用程序运行 Gradle 构建脚本 - Running Gradle Build Script from Java Desktop Application for Android App 如何设置要在桌面应用程序和Android App中使用的Java库 - How to set my java library to be used in desktop application and Android App Java桌面应用程序:如何在热键按下时最大化托盘应用程序? - Java desktop app: How to maximize tray application when hotkey pressed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM