Skip to content

Commit a7f1981

Browse files
jelbournjosephperrott
authored andcommitted
refactor(button): use [attr.disabled] host binding in MatButton (#15308)
1 parent e739e61 commit a7f1981

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib/button/button.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ describe('MatButton', () => {
4343

4444
it('should expose the ripple instance', () => {
4545
const fixture = TestBed.createComponent(TestApp);
46-
const button = fixture.debugElement.query(By.css('button')).componentInstance as MatButton;
46+
fixture.detectChanges();
4747

48+
const button = fixture.debugElement.query(By.directive(MatButton)).componentInstance;
4849
expect(button.ripple).toBeTruthy();
4950
});
5051

src/lib/button/button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const _MatButtonMixinBase:
7070
button[mat-flat-button]`,
7171
exportAs: 'matButton',
7272
host: {
73-
'[disabled]': 'disabled || null',
73+
'[attr.disabled]': 'disabled || null',
7474
'[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
7575
},
7676
templateUrl: 'button.html',

0 commit comments

Comments
 (0)