I think href
is available on an a
, but not an ion-item
element. So you want either:
<a ion-item href="tel:..."><ion-icon>...</ion-icon></a>
or
<ion-item>
<a href="tel:..."><ion-icon>...</ion-icon></a>
</ion-item>
(In these examples, replace the ...
with the appropriate content.)
call this method from your html
<button ion-button (click)="callNumber(1236547890)">Call Number</button>
and in .ts write this
callNumber(phoneNumber){
window.open('tel:' + phoneNumber, '_system');
}
Must work in ios and android
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.