我在我的 ionic 2 应用程序中使用 SMS 消息。我有最新版本的 Cordova CLI 和最新版本的 Ionic 2。
当我使用
<a href="sms:14038000000"><button outline><ion-icon name="ios-chatbubbles"></ion-icon></button></a>
它可以作为短信正常工作:14038000000,
当我使用
<ion-card *ngFor="let item of corp">
<div class="contact-name">
{{ item.name}}
</div>
<div class="contact-content">
<a href="sms:{{item.sms}}"><button outline><ion-icon name="ios-chatbubbles"></ion-icon></button></a>
</div>
</ion-card>
短信出现不安全:短信:14038000000
在我使用的 ionic 1 app.js
.config(function($compileProvider){
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|http?|ftp|mailto|file|sms|tel):/);
})
来解决这个问题。
Ionic 2 app.ts 是否有类似的解决方案