How to make ion-option-button click to call?

Here is what I tried

<ion-option-button class="button-large ion-ios7-telephone-outline">
                           
          <a href="tel:{{user.phone}}"></a>
        </ion-option-button>

When you click it, nothing happens.

try this:

<ion-option-button class="button-large ion-ios7-telephone-outline" ng-click="tel:{{user.phone}}">
     text
</ion-option-button>

i use it this way and it works

Thank you for your tip.
But it does not work here.
On the console, you can see (here user.phone is 11111111 for test):
D/CordovaLog( 3469): file:///android_asset/www/bower_components/angular/angular.js: Line 9899 : Error: [$parse:syntax] Syntax Error: Token ‘:’ is an unexpected token at column 4 of the expression [tel:11111111] starting at [:11111111].

okey this doesnt work like i wanted.

i have tried this(worked):
if you dont already have create a Controller then call form the ion-option-button the method with ng-click.
Now in the method run this (in controller):

       $scope.CallTel = function(tel) {
            window.location.href = 'tel:'+ tel;
        }

view:

<ion-option-button class="button-assertive" ng-click="CallTel ({{user.phone}})">
    call
</ion-option-button>

this works on Iphone! this should also work on android.

1 Like

you can just use a <a href="tel:11111111">Call user</a>

Thank you, @Auro and @Bonda
It works.

Hey what did you do here to get it to work?