Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
feat(listItem): allow use of own md-buttons
Browse files Browse the repository at this point in the history
closes #2839
  • Loading branch information
rschmukler committed May 20, 2015
1 parent 1538ebe commit 0ef4b79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function mdListItemDirective($mdAria, $mdConstant, $timeout) {
}
if (hasProxiedElement) {
wrapIn('div');
} else {
} else if (!tEl[0].querySelector('md-button')) {
tEl.addClass('md-no-proxy');
}
} else {
Expand Down
7 changes: 6 additions & 1 deletion src/components/list/list.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe('mdListItem directive', function() {
ddescribe('mdListItem directive', function() {

This comment has been minimized.

Copy link
@erwinmombay

erwinmombay May 20, 2015

Contributor

howdy, can we fix this? accidentally got merged into master.

beforeEach(module('material.components.list', 'material.components.checkbox', 'material.components.switch'));

function setup(html) {
Expand Down Expand Up @@ -94,4 +94,9 @@ describe('mdListItem directive', function() {
expect(secondChild.nodeName).toBe('MD-BUTTON');
});

it('should detect non-compiled md-buttons', function() {
var listItem = setup('<md-list-item><md-button ng-click="sayHello()">Hello</md-button></md-list-item>');
expect(listItem.hasClass('md-no-proxy')).toBeFalsy();
});

});

0 comments on commit 0ef4b79

Please sign in to comment.