April 2017
Beginner to intermediate
378 pages
7h 57m
English
The final plugin we are going to take a look at is the Geolocation plugin, which helps to fetch the coordinates of the device.
You can know more about the plugin from here: https://github.com/apache/cordova-plugin-geolocation and https://ionicframework.com/docs/native/geolocation/.
First, scaffold a new blank app for the Geolocation plugin:
ionic start -a "Example 20" -i app.example.twenty example20 blank --v2
Once the app is scaffolded, cd into the example20 folder. Now we will add the Geolocation plugin, run the following command:
ionic plugin add cordova-plugin-geolocation
Next, run the following command to add the Ionic Native module:
npm install --save @ionic-native/geolocation
Now, we register the provider. Update ...
Read now
Unlock full access