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?
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:
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?