@ionic-native/core
Advanced tools
Comparing version 4.2.1 to 4.3.0
{ | ||
"name": "@ionic-native/core", | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"description": "Ionic Native - Native plugins for ionic apps", | ||
@@ -5,0 +5,0 @@ "module": "index.js", |
@@ -55,3 +55,3 @@ [![Circle CI](https://circleci.com/gh/ionic-team/ionic-native.svg?style=shield)](https://circleci.com/gh/ionic-team/ionic-native) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![](https://img.shields.io/npm/v/@ionic-native/core.svg) | ||
constructor(private geolocation: Geolocation, private platform: Platform, private ngZone: NgZone) { | ||
constructor(private geolocation: Geolocation, private platform: Platform) { | ||
@@ -62,5 +62,3 @@ platform.ready().then(() => { | ||
geolocation.getCurrentPosition().then(pos => { | ||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`) | ||
}); | ||
@@ -71,11 +69,4 @@ | ||
const watch = geolocation.watchPosition().subscribe(pos => { | ||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`) | ||
// Currently, observables from Ionic Native plugins | ||
// need to run inside of zone to trigger change detection | ||
ngZone.run(() => { | ||
this.position = pos; | ||
}) | ||
this.position = pos; | ||
}); | ||
@@ -85,7 +76,6 @@ | ||
watch.unsubscribe(); | ||
}); | ||
} | ||
} | ||
@@ -92,0 +82,0 @@ ``` |
101806
179