Hi there,
I use the following snippet in my controller to show a “Loading state” when needed
// LOADING CONTROLLER
.controller('loadingCtrl', function ($scope, $timeout, $ionicLoading) {
"use strict";
$ionicLoading.show({ // Setup the loader
content: 'Loading',
animation: 'fade-in',
showBackdrop: true,
maxWidth: 200,
showDelay: 0
});
$timeout(function () { // Set a timeout to clear loader, however you would actually call the $ionicLoading.hide(); method whenever everything is ready or loaded.
$ionicLoading.hide();
}, 2000);
})
and it is called in my html ( I had also tried to put in in the body
tad of the index.html) :
<ion-item ng-controller="loadingCtrl" bindonce ng-repeat= "dish in dishList | selectedDishType:selection " href="#/wmapp/dishList/{{dish.itemid}}">
While is is showing properly on chrome browser, when running the app on Android, it fails to show up instantly but somehting like2-3 seconds after user taps some button, which defeats the purpose of having it …
Is someone having the same issues ? Any idea of how to solve it ?
Thanks,
Laurent