0
I’m trying to call a function inside the other function but it keeps giving:
ERROR Referenceerror: "closeGPS is not defined" enableGPS tab1.page.ts:35
my code currently:
enableGPS() {
console.log("enable gps");
this.gps = true;
navigator.geolocation.getCurrentPosition(function (local) {
sessionStorage.setItem('lat', local.coords.latitude);
sessionStorage.setItem('lon', local.coords.longitude);
closeGPS();
});
}
closeGPS() {
this.close = true;
}