Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

$ionicLoading stuck during extensive calculations

$
0
0

Hi, maybe this is a late night issue, but I cannot solve this puzzle by myself. I've got a time consuming calculation that takes about 4 secs. I'd want to use the $ionicLoading service to show a spinner during this calculations, but I can't make this work. I have a code like this:


$scope.showSpinner(); // simple $ionicLoading.show({..});
$scope.extensiveCalculations(); // takes about 4 secs

If I use the above code the $ionicLoading doesn't even show.

If I call the calculation after some timeout (e.g. 300ms) then the $ionicLoading is visible, starts to spin but immediately stops when the calculation begins.


$scope.showSpinner();
$timeout(function() {
....$scope.extensiveCalculations(); // long calculations
}, 300);

Could you please give me a hint how to put the calculation into background so that the spinner spins freely until the job is done? I can make it work with the cordova plugin for spinnderdialog, but I don't want to use it in that case.

Cheers,
Rafal


Viewing all articles
Browse latest Browse all 228595

Trending Articles



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