In your package.json make sure to include the dependencies:
{
...
"dependencies": {
...
"ionic-native": "^1.3.10",
...
},
...
}
To use geolocation:
// custom-component.ts
import {Geolocation} from 'ionic-native';
...
For a more real time solution you can use watchPosition function in Geolocation that notifies whenever an error or a position change occurs.
Unlike the getCurrentPosition the watchPosition returns an Observable
import {Geolocation} from 'ionic-native';
import template from './custom-component.htm...