I’m having trouble with the IonicLoading (I’m using the nightly build).
The first time I open my app, the loading popup doesn’t disappear (most of the times however, I can still use the app, and if I pull to refresh, the loading popup disappears).
However, this is only the case when I test it in a browser (chrome or safari, doesn’t matter) on an iPhone, when I test it in chrome on my dekstop with iPad emulation, it works just fine.
When I use ionicLoading, I usually call the hide() method on a specific instance of ionicLoading (like the instance you instantiated when you passed in the options object with template). (Side note: I think you want the ‘content’ property of that options object, not ‘template’). You also need to return that instance to assign it as a value. Here’s a little example that uses a timeout to remove the loading screen:
$scope.show = function () {
return $ionicLoading.show({
content: 'Loading...'
});
};
$scope.getLabRequests = function () {
var loading = $scope.show();
$timeout(function(){
loading.hide();
}, 5000);
};
$scope.getLabRequests();
Thanks for the help, I’ll try it on monday and let you know if it works. I will post a CodePen, but it works fine on desktop browsers so I’m not sure if that helps
Thanks a lot, this does work. Still one “problem” however, the loader pops up on the absolute right of the screen. Is there any way to center this ?
Edit: apparently the latest nightly already fixed this. Now it shows a centered popup, but on the whole width of the screen. Is there any way to change this ? Not absolutely necessary, but would be nice.