Prevent the closure of the md-menu-bar to ng-click

I have a md-menu-bar like this:

        <button ng-click="$mdOpenMenu()">
                    <md-button ng-click="doSomething()">...</md-button>
                    <md-button ng-click="doSomethingButDoNotClose()">...</md-button>


I need you at the click of md-button with doSomethingButDoNotClose the menu not being closed, how do I proceed?


Pass the event object to your function like this:

<md-button ng-click="doSomethingButDoNotClose($event)">...</md-button>

...and use it inside of your doSomethingButDoNotClose function:

$scope.doSomethingButDoNotClose = function (event) {

The preventDefault function stops the default event actions from occurring and (hopefully) will prevent the menu from closing (I haven't tested with md-button though).

Need Your Help