Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49177

$ionicLoading does not return a promise

$
0
0

@Remrem wrote:

Hello,

according to the documentation, this should work :

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

        $ionicLoading.show({
            template: 'Loading...'
        }).then(function(){
            console.log("The loading indicator is now displayed");
        });

        $timeout(function(){
            _this.loadSelectedStage();
        }, 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.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49177

Trending Articles



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