diff --git a/src/components/list/list.js b/src/components/list/list.js index 9d95718acba..607c29c11bb 100644 --- a/src/components/list/list.js +++ b/src/components/list/list.js @@ -110,6 +110,7 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) { tEl.addClass('md-no-proxy'); } } + wrapSecondary(); setupToggleAria(); @@ -142,7 +143,9 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) { tEl[0].setAttribute('tabindex', '-1'); tEl.append(container); + } + function wrapSecondary() { if (secondaryItem && !isButton(secondaryItem) && secondaryItem.hasAttribute('ng-click')) { $mdAria.expect(secondaryItem, 'aria-label'); var buttonWrapper = angular.element(''); @@ -155,10 +158,10 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) { // Check for a secondary item and move it outside if ( secondaryItem && ( - secondaryItem.hasAttribute('ng-click') || + secondaryItem.hasAttribute('ng-click') || ( tAttrs.ngClick && - isProxiedElement(secondaryItem) ) - )) { + isProxiedElement(secondaryItem) ) + )) { tEl.addClass('md-with-secondary'); tEl.append(secondaryItem); }