I have a local application url protocol: myapp:///
In the terminal, when I do open myapp:///
, the application launches. As I understand, this command is a bit different from different OS. Also, if I go to a browser and type myapp:///
I also launch the application.
My question is: can I do this in AngularJS by making some kind of request?
答案 0 :(得分:0)
我通过提供用户可以点击的链接解决了这个问题。但是,必须在app.js
:
app.config(['$compileProvider', function ($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|myapp):/);
}]);
此白名单myapp:///
- 否则AngularJS会在其前面添加unsafe
。