I want use $ionicLoading with nightly but it doesn’t work, i have test with $ionicLoading.hide(); because a instance is depreced but it doesn’t work again :s
Odd. I can’t see any difference and still doesen’t work. Here is my full controller’s code. I can’t see the loading screen at all. I also tried to take out all the instances of $ionicLoading.hide() to be sure, same results. No js errors. The rest of the code works as intended. Maybe I’m calling it in the wrong place?
// –––––––––––––––––––––––––––
// Numbers
// –––––––––––––––––––––––––––
.controller('NumbersCtrl', function($scope, $ionicLoading, $angularCacheFactory, Numbers) {
$ionicLoading.show({
content: 'Caricamento...'
});
var cache = $angularCacheFactory.get('cache');
if(!cache.get('numbers')) {
Numbers.all().success(function(data, status) {
$scope.numbers = data.numbers;
cache.put('numbers', data.numbers);
$ionicLoading.hide();
})
.error(function() {
$scope.showAlert = function() {
var alertPopup = $ionicPopup.alert({
title: 'Nessuna Rete Disponibile',
template: 'Sembra che non ci sia nessuna connessione di rete.'
});
};
$scope.showAlert();
$ionicLoading.hide();
})
}
else {
$scope.numbers = cache.get('numbers');
$ionicLoading.hide();
}
})
I don’t get any error in the console. I tried your solutions without success. Here is the updated controller. I put a timeout of 1s and commented all the .hide() lines so that the loader should never disappear. I also created a button to call the showLoader function, with no results. Both when i load the page and when i click the button nothing is shown.