电话号码的角度绑定 [英] Angular binding for tel number

查看:76
本文介绍了电话号码的角度绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图绑定一个电话号码,该电话号码来自服务器加载的Json对象.我怎么了

I trying to bind a telephone number which comes from a Json object loaded from a server. What's my mistake?

<a ng-href="tel:{{card.phone}}"><i class="fa fa-phone redicon fa-2x"></i></a>

这是数据:

"phone": "+4199999999",

推荐答案

无需使用角度指令(例如 ng-href )进行插值:

No need for interpolation with angular directives (such as ng-href):

<a ng-href="tel:card.phone"><i class="fa fa-phone redicon fa-2x"></i></a>

这篇关于电话号码的角度绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆