javascript - Display the value of selected menu item on a button angular -


i stuck @ issue have list of menu item

<md-menu-item ng-value="menuitem.value" ng-repeat="menuitem in filtermenu.menuitems" ng-click="activefilterctrl.selectedfilter(menuitem)" translate>     <md-button>         {{ menuitem.name }}     </md-button> </md-menu-item> 

following code want display value of selected menu item on button or on label should displayed after selection of menu item. please me resolve issue

in code call selectedfilter(menuitem) function. can add in function:

$scope.selectedfilter = function(menuitem){ // code here $scope.mylabel = menuitem.name; } 

and in html:

<md-button>     {{mylabel}} </md-button> 

Comments

Popular posts from this blog

javascript - Why Selenium can't find an element that is graphically visible -

java - How to compare two classes -

mysql - Gateway Timeout Error on Insert 70000 record using Hibernate in Java -