Update README.md

Incorrect usage of watchPosition().subscribe and then unsubscribe
This commit is contained in:
Max Lynch 2016-06-10 13:59:51 -05:00 committed by GitHub
parent 97ad1bc92f
commit 3a2c8f3e26

View File

@ -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);
});