mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-03-10 00:00:07 +08:00
Update README.md
Incorrect usage of watchPosition().subscribe and then unsubscribe
This commit is contained in:
@@ -23,8 +23,7 @@ Geolocation.getCurrentPosition().then(pos => {
|
||||
console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
|
||||
});
|
||||
|
||||
let watch = Geolocation.watchPosition();
|
||||
watch.subscribe(pos => {
|
||||
let watch = Geolocation.watchPosition().subscribe(pos => {
|
||||
console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user