<md-menu> only close with md-button with ng-click, need to be same with ng-href
md-menu-item md-button ng-href="/user-info">Edit User Info</md-button /md-menu-item>
currently this needs to be
md-menu-item> md-button ng-click="" ng-href="/user-info">Edit User Info</md-button /md-menu-item>
make ng-href works same as ng-click, doesn't this look natural?
If this is a problem I'd suspect ui-sref has the same issue.
The current
Uncaught TypeError: target.hasAttribute is not a function
Caused by the function that is trigger when you close the menu.
do {
- if (target && target.hasAttribute('ng-click')) {
+ if (target && target.nodeType == 1 && target.hasAttribute('ng-click')) {
if (!target.hasAttribute('disabled')) {
close();
}
break;
}
- } while ((target = target.parentNode) && target != opts.menuContentEl)
+ } while ((target = target.parentNode) && target != opts.menuContentEl[0])
@hthetiot Faced with the same problem! Create PR. Why "target.nodeType == 1" there?
:+1: Faced this issue. I'm using ui-sref / ng-href.
Maybe a copepen could help : http://codepen.io/anon/pen/yNPOBV
-> Click on the first "Redial" menu item, and see the error thrown.
There is also a problem using 'data-ng-click' instead of 'ng-click'. Actually it doesn't work with 'data' prefix (FF and Chrome), works fine with ng-click.
same problem here! any suggestion?
same problem here, can this be fixed ?
+1 with ui-router
+1 with ui-router ui-sref
// deleted, sorry guys my bad