You will get that exact
No provider for
MatDialogRef
error in case you include your dialog’s component html selector in dialog-overview-example.html
like <dialog-overview-example-dialog></dialog-overview-example-dialog>
There is no need for that, do not include the html selector of the dialog component anywhere.