From 95292dd42d29da0d3b79dd2e3ab34fb9a2f172e2 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Wed, 24 Jul 2019 21:57:30 +0200 Subject: [PATCH] refactor(dialog): allow matDialogClose on non-button nodes Loosens up the selector on `MatDialogClose` so that it can be added on everything, not just buttons. Fixes #16597. --- src/material/dialog/dialog-content-directives.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/material/dialog/dialog-content-directives.ts b/src/material/dialog/dialog-content-directives.ts index 5dec4d9dca9c..cf8cf0f2c85f 100644 --- a/src/material/dialog/dialog-content-directives.ts +++ b/src/material/dialog/dialog-content-directives.ts @@ -25,7 +25,7 @@ let dialogElementUid = 0; * Button that will close the current dialog. */ @Directive({ - selector: `button[mat-dialog-close], button[matDialogClose]`, + selector: '[mat-dialog-close], [matDialogClose]', exportAs: 'matDialogClose', host: { '(click)': 'dialogRef.close(dialogResult)',