$ionicLoading does not return a promise


according to the documentation, this should work :

$scope.select = function(item) {
$scope.selected = item;

            template: 'Loading...'
            console.log("The loading indicator is now displayed");

        }, 0);

but it doesn’t… This is my javascript console :

ionic.bundle.min.js:142 TypeError: $ionicLoading.show(…).then is not a function

I need to run _this.loadSelectedStage() after the loading indicator is displayed. If don’t use then(), the loadSelectedStage() function start to run before the display of the loading indicator…

I am stuck on this for 2 days…

Can someone help me out ?

Thank you in advance.

Please Post the ionic info of your project.It seems only in ionic 1.3.1 they are returning promise.Before that it just a function I guess.

Try using without then function.



thank you very much, I am gonna try with ionic 1.3.1 (I am currently in 1.2.1-nightly-1867…)

I already tried whithout the then function, but in that case my loadSelectedStage function runs before the ionicLoading display :confused:

Indeed, I installed Ionic v1.3.1 and $ionicLoading return now a promise.

Thank you very much :slight_smile: