This tutorial shows how to use GPS functioanlity with ionic. The following guide is intended for mac os x. The steps might be different for linux or windows.
-
Download and install ionic http://ionicframework.com/docs/guide/installation.html
-
Download and Install ngcordova with "bower install ngCordova"
-
Start a new blank ionic app by writing this command into terminal "ionic start ionicgpstest blank"
-
dd into app location
-
Add cordova Geolocation plugin with this command "cordova plugin add cordova-plugin-geolocation"
-
Use controller function from http://ngcordova.com/docs/plugins/geolocation/
-
Run the app