Skip to content

set only local reference of menu template, delete reference to button #129

@elvisbegovic

Description

@elvisbegovic

ENHANCEMENT:

With actual approch of your Menu component, I need set event and btn reference:
m1.toggle($event, btn1)
The problem with this approach: I'm inside a loop (of an 3th party component) to display a large set of LIST and I can't set dynamically this local reference for each button, so if you don't understand I think you can check how material2 reach this problem, with material2 we only set:

<button md-icon-button [md-menu-trigger-for]="menu">
   <md-icon>more_vert</md-icon>
</button>

Like this we can repeat a lot of times this button, it call the #menu template and menu template is positionned automatically next to the right button where we clicked.

I think this approach is a little better to avoid specify each time btn1 btn2 btn2 local reference.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions