Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Close "select" html when my app resume from background

$
0
0

You can detect the background / foreground events with this code in your run():

       //handle Cordova resume (enter foreground) and pause (enter background events)
        $ionicPlatform.on('resume', function() {
            $rootScope.$broadcast('onResume');
        });

        $ionicPlatform.on('pause', function() {
            $rootScope.$broadcast('onPause');
        });

...then in the controller where your select is:

//app entered foreground
$scope.$on('onResume', function () {
    //code here to close select

});

//app entered background
$scope.$on('onPause', function () {
    
});

Viewing all articles
Browse latest Browse all 228595

Trending Articles



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