angularjs - Keep menu open after selecting a item in angular -


my menu closing after click on togglesharebutton. 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

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -