Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49103

My $timeout makes diffrent $timeouts

$
0
0

@mathiasRobinson wrote:

Hello, for my app i use some $timeouts for when to send the GPS data to my server. how ever the time is diffrent every time.

if (geoLocationFound > 12) {
                    $timeout(function () {
                        gettingLocation = false;
                    }, 55000);
                } else {
                    $timeout(function () {
                        gettingLocation = false;
                    }, 5000);
                }

the one with 5 second timeout appears to be right, but the 55 if off. it goes from all between 1min and 3mins.
the rest of the controller can be seen at http://codepen.io/anon/pen/yeNrvJ

Hope someone out there can help me fixing this problem
Mathias

Sorry if this is wrongly categorized.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>