Using ngx-keyevent directive to close a Material dialog.
Open a dialog
Injecting the ngx-keyevent service in any component to listen for key events:
Start typing..
.