Geolocation service



I am trying to create an app that gets the users position and stores values in a global var lat and long so i can access them anywhere within the app. How should i go about creating such service/factory that can run on start up and continue to update as the user moves around.


Geolocation is provided as part of the Phonegap API not by angular. Have a look at to see the geolocation API for phonegap.