olivier
olivier

Reputation: 2645

Angular binding for tel number

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>

This is the data:

"phone": "+4199999999",

Upvotes: 1

Views: 1412

Answers (2)

Hardik Vaghani
Hardik Vaghani

Reputation: 2173

If Phone number is not being detected then you might want to check for following line in header part

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

OR you can set

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

to get it working.

Regards.

Upvotes: 1

AranS
AranS

Reputation: 1891

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>

Upvotes: 2

Related Questions