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
Post a Comment