angularjs - Keep menu open after selecting a item in angular -
my menu closing after click on toggleshare
button. how can prevent this. use angularjs angular material
here code:
<md-menu> <md-button ng-click="$mdopenmenu()"> </md-button> <md-menu-content> <md-menu-item> <md-button ng-click="toggleshare()"> </md-button> </md-menu-item> </md-menu-content> </md-menu>
you can use md-prevent-menu-close
attribute stop menu closing suggested in offical doc. here how write code
<md-menu> <md-button ng-click="$mdopenmenu()"> </md-button> <md-menu-content> <md-menu-item> <md-button ng-click="toggleshare()" md-prevent-menu-close="md-prevent-menu-close"> </md-button> </md-menu-item> </md-menu-content> </md-menu>
here working example of desired result using method. http://codepen.io/next1/pen/anadyr
Comments
Post a Comment