@@ -93,7 +93,9 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
93
93
94
94
tEl [ 0 ] . setAttribute ( 'role' , 'listitem' ) ;
95
95
96
- if ( ! tAttrs . ngClick ) {
96
+ if ( tAttrs . ngClick || tAttrs . ngHref || tAttrs . href || tAttrs . uiSref || tAttrs . ngAttrUiSref ) {
97
+ wrapIn ( 'button' ) ;
98
+ } else {
97
99
for ( var i = 0 , type ; type = proxiedTypes [ i ] ; ++ i ) {
98
100
if ( proxyElement = tEl [ 0 ] . querySelector ( type ) ) {
99
101
hasProxiedElement = true ;
@@ -105,8 +107,6 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
105
107
} else if ( ! tEl [ 0 ] . querySelector ( 'md-button:not(.md-secondary):not(.md-exclude)' ) ) {
106
108
tEl . addClass ( 'md-no-proxy' ) ;
107
109
}
108
- } else {
109
- wrapIn ( 'button' ) ;
110
110
}
111
111
setupToggleAria ( ) ;
112
112
@@ -134,7 +134,8 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
134
134
tEl . addClass ( 'md-proxy-focus' ) ;
135
135
} else {
136
136
container = angular . element ( '<md-button class="md-no-style"><div class="md-list-item-inner"></div></md-button>' ) ;
137
- var copiedAttrs = [ 'ng-click' , 'aria-label' , 'ng-disabled' ] ;
137
+ var copiedAttrs = [ 'ng-click' , 'aria-label' , 'ng-disabled' ,
138
+ 'ui-sref' , 'href' , 'ng-href' , 'ng-attr-ui-sref' ] ;
138
139
angular . forEach ( copiedAttrs , function ( attr ) {
139
140
if ( tEl [ 0 ] . hasAttribute ( attr ) ) {
140
141
container [ 0 ] . setAttribute ( attr , tEl [ 0 ] . getAttribute ( attr ) ) ;
0 commit comments