I have the following code:
<span ng-if="contacto">Teléfono:
<a href="TEL://{{contacto.telefono}}">{{contacto.telefono}}</a>
<m ng-if="contacto.extension"> Ext:
<a ng-repeat="ext in contacto.extension.split(';')" href="TEL://{{contacto.telefono+ext}}">{{ext}}</a>
</m>
</span>
and I want to put ng-click
to warn that the phone has been clicked, but I do not know if it is possible, since I tried to put ng-click
on the <a>
tag but it does not work for me.
in the contolador I have the following ...
$scope.registrarllamada = function(c){
console.log("Estamos llamando a.." + c.telefono);
}
in the view I did this ...
<a ng-click="registrarllamada(contacto)" href="TEL://9{{contacto.telefono}}">{{contacto.telefono}}</a>
But it does not work, I do not print anything when I click.