Is there an isOpen
property (or similar) for the <md-menu>
directive in angular-material
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);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With