Changing status bar color on side menu toggle

Hi,

Is it possible to change the status bar color when the side menu gets toggled?

You can use the statusbar plugin:
https://github.com/apache/cordova-plugin-statusbar/blob/master/doc/index.md

The problem is not actually changing the color because I can do that using the ngCordova but the problem is to detect whether the side menu is open or closed using some sort of watcher.

you do not need a watcher for that:
http://ionicframework.com/docs/api/service/$ionicSideMenuDelegate/

there is a function called isOpen() :wink:

I need to monitor the value for the isOpen() to check if the side menu is open or not.

Ah okay you have the “canDragContent” on?

If not you can open the sidebar on your own via ng-click on the sidemenu button -> then you can toggle your sidebar and check if it was open or closed.

But you can truly use a watcher on this.

*it was a long day for me… ^^

1 Like