Gelocation call in tabs project results in double prompt

My Ionic Tabs project starts with a tab containing a geolocation call.

Upon load on my device, I get two prompts asking for location permission.

I’m guessing I get that double permission prompt because Ionic hasn’t fully loaded.

If I comment out the first geolocation call in my controller (e.g. Location.getCurrentPosition().then(..);) and then “Pull to Refresh the page”. I do not get the prompt and page loads as expected.

Is there something in my app.js or index.html that’s causing this controller to fire before Ionic is fully loaded?

WORKAROUND


If I use $timeout to wait 2 seconds before getting current location, I do not receive the prompt:

$timeout(function(){console.log('timeout function');}, 2000).then(function(){
    console.log('time expired');
    Location.getCurrentPosition().then(
        success_callback,
        error_callback
    );
}

);