Reputation: 473
I want to add dynamic md-menu-item inside md-menu
<md-menu>
<img class="width-10" src="source/assets/images/icons/icomenu.png" class="md-icon-button" ng-click="$mdOpenMenu($event)" />
<md-menu-content>
<md-menu-item ng-click="hideComment(singleComment.CommentUID,singleComment.Ver,singleComment.Note)"><md-button>Hide Conversation</md-button></md-menu-item>
<md-menu-item><md-button>Hide Annotation</md-button></md-menu-item>
<md-menu-item><md-button>Delete Conversation</md-button></md-menu-item>
<md-menu-item><md-button>Delete Annotation</md-button></md-menu-item>
<md-menu-item><md-button class="notify-reviewers"><input type="checkbox" /> Notify Reviewers </md-button></md-menu-item>
</md-menu-content>
</md-menu>
I want to add "hide conversation and replies" on particular condition dynamically
Upvotes: 1
Views: 975
Reputation: 424
You can define it on the HTML and keep an ng-show tag on it with a $scope variable, than you can change this value from false to true to show it. But, if there's more than one menu, you should make an array of object with the information of each one and do the same thing but using the variable of the object.
If you share your code, we can help you and we can show the solution right to the point.
Upvotes: 1