Andrei Gheorghiu Andrei Gheorghiu - 1 year ago 131
Javascript Question

Is there an isOpen property of <md-menu> directive?

Is there an

property (or similar) for the
directive in
that one could listen or bind to?

Note: My initial question was a lot longer and overly complicated but @Sarhanis made me realize I was asking the wrong question.

Answer Source

Thanks to @Sarhanis, I was able to find out how to bind actions to menu opening and closing events. On opening and closing menus, Angular Material broadcasts $mdMenuOpen, respectively $mdMenuClose events:

$scope.$on('$mdMenuOpen', function(event, menu) { 
    console.log('opening menu...', event, menu); 

$scope.$on('$mdMenuClose', function(event, menu) { 
    console.log('closing menu...', event, menu); 

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download