question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

md-menu binding # dynamic

See original GitHub issue

Hi all, I want to assign the md-menu trigger action as the code below, but failed. Can you guide me?

  <div *ngFor="let menuItem of mainMenu">
   <div ng-if="menuItem.item.length > 0">
    <button md-button [mdMenuTriggerFor]="menuItem.mdMenuTriggerFor">
     <md-icon svgIcon="{{menuItem.icon}}"></md-icon>
     <span>{{menuItem.title}}</span>   
    </button>
    <md-menu {{menuItem.mdMenuTriggerFor}}="mdMenu">
     <div *ngFor="let item of menuItem.item">
      <button md-menu-item routerLink="{{item.routerLink}}">
       <md-icon svgIcon="{{item.icon}}"></md-icon>
       <span>{{item.title}}</span>
      </button>
     </div>
    </md-menu>
   </div>
   <div ng-if="menuItem.item.length == 0">
    <button md-button routerLink="{{menuItem.routerLink}}">
     <md-icon ng-if="menuItem.icon.length != 0" svgIcon="{{MenuItem.icon}}"></md-icon>
     <span>{{menuItem.title}}</span>   
    </button>
   </div>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
mblundred-yseopcommented, Jan 10, 2017

What was the fix? I’m having this problem too.

2reactions
leehung-netcommented, Jan 25, 2017

display correct

<div *ngFor="let menuItem of menus">
    <button md-button [mdMenuTriggerFor]="menu">
       <span>{{menuItem.title}}</span>
    </button>
    <md-menu #menu="mdMenu">
      <button md-menu-item>Refresh - {{menuItem.title}}</button>
      <button md-menu-item>Settings - {{menuItem.title}}</button>
    </md-menu>
</div>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Investigation of arc repressor DNA-binding specificity by ...
In this paper, we investigated the role of protein flexibility in protein-DNA-binding specificity by comparative molecular dynamics (MD) simulations.
Read more >
Unable to bind the dynamic data into Angular Material select ...
I am able to display the product name but unable to display that drop down value which is binding dynamically. I need to...
Read more >
Single-molecule nanopore sensing of actin dynamics and ...
Using nanopores, we determined the state of actin at the macromolecular level (filamentous or globular) and in its monomeric form bound to inhibitors....
Read more >
rpi-networklab/dynamic-dns.md at main - GitHub
An example configuration to include in the bind zone file that allows the updating of ANY data; An example nsupdate command to perform...
Read more >
Fast Dynamic Docking Guided by Adaptive Electrostatic Bias
Here, we propose a new method, dubbed MD-Binding, which systematically exploits MD to predict binding complexes and identify plausible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found