Andrei Gheorghiu Andrei Gheorghiu - 1 year ago 79
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.


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);