angularjs - 使用 ionic 调用电话号码时获取 net::ERR_UNKNOWN_URL_SCHEME

标签 angularjs ionic-framework

我在 config.xml 中有这段代码

<content src="index.html"/>
<access origin="*"/>
<allow-navigation href="tel:*" />
<allow-intent href="tel:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="http://*/*"/>
<allow-navigation href="tel:*"/>
<allow-navigation href="http://*/*"/>
<allow-navigation href="https://*/*"/>
<access origin="mailto:*" launch-external="true" />
<access origin="tel:*" launch-external="true" />

在 HTML 中:

<a ng-href="tel:{{item.phone}}"><h3>Anrufen</h3></a>

item.phone 返回 0331234567

在 index.html 中:

<meta name="format-detection" content="telephone=yes">

我的错误是什么?

最佳答案

<content src="index.html"/>
<access origin="*"/>
<access origin="mailto:*" launch-external="true" />
<access origin="tel:*" launch-external="true" />

保留这些。删除其他人。

这两个导致 net::ERR_UNKNOWN_URL_SCHEME 问题:

<allow-navigation href="tel:*" />
<allow-intent href="tel:*"/>

关于angularjs - 使用 ionic 调用电话号码时获取 net::ERR_UNKNOWN_URL_SCHEME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39125043/

相关文章:

ionic-framework - ionic 问题 No 'Access-Control-Allow-Origin'

cordova - 代码推送 : Where to find Deployment Key for Visual Studio project

javascript - 在 Greasemonkey 中修改 Angular JS 中的 DOM 元素

mysql - 如何使用/Angular 从 MySQL 服务器查看 RowDataPacket?

javascript - 如何在 Angular Router UI 中使用非捕获组

javascript - ionic : AngularJS Variables not Updating DOM with $scope

AngularJS ng-repeat 数组,每个项目具有唯一的 $scope 变量

javascript - Angular 多选图表

javascript - AngularJS ng-repeat 用于行和项目

angular - 检索 Firebase 快照导致加载时出现验证错误