I'm having trouble generating the coordinates in ionic using geolocation
. It only works if you press and hold the button that calls the function until the coordinates appear. So I wanted to know how I can get a part of the code to automatically call the function, without me updating "manually"?
<ion-item>
<ion-input type="text" [(ngModel)]="cad.longitude" value="{{long}}" (click)="local()" readonly>
</ion-input>
</ion-item>