Hide Status Bar when Side Menu is Active


#1

Hey,

Is it possible to hide the StatusBar when a side menu is active?


#2

Sure, you could do something like this.

  .directive('hideStatusBar', function ($timeout, $ionicSideMenuDelegate) {
  return {
    restrict: 'A',
    link: function ($scope) {
      // Run in the next scope digest
      $timeout(function () {
        $scope.$watch(function () {
          return $ionicSideMenuDelegate.isOpen();
        },function (isOpen) {
          if(isOpen){
            // hide the status bar
          } else {
            //show the status bar
          }
        });
      });
    }
  }
})

#3

Thanks! I found your code somewhere else and then realized I could do that.