Answer the question
In order to leave comments, you need to log in
How to display a material light menu that is generated dynamically?
Menus taken from here:
https://getmdl.io/components/index.html#menus-section
Here is the code that generates the menu:
<div class="demo-card-event mdl-card mdl-shadow--2dp" ng-repeat="exemplers in modelExemplersLists">
<button id="demo-menu-top-right-{{ exemplers.id }}"
class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-menu--top-right mdl-js-menu mdl-js-ripple-effect"
data-mdl-for="demo-menu-top-right-{{ exemplers.id }}">
<li class="mdl-menu__item">Редактировать</li>
<li class="mdl-menu__item">Удалить</li>
</ul>
</div>
</div>
dataService.getModelExemplarsList(model.id, function(data){
$scope.modelExemplersLists = data.exemplars;
angular.element(document).ready(
function() {
componentHandler.upgradeAllRegistered();
});
});
Answer the question
In order to leave comments, you need to log in
Пока работает это
angular.element(document).ready(
function() {
componentHandler.upgradeAllRegistered();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question