Q:

NullInjectorError: No provider for MatDialog getting while adding mat dialog

Am getting "NullInjectorError: No provider for MatDialog", below is the code 
Open stackblitz link and click on orders link
https://stackblitz.com/edit/tms-prototype

A:

You should import MatDialog from the same place where you have imported MatDialogModule since they represent different bundles.
So use:
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
                                                                           ^^^^^^^

instead of
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';

because you imported MatDialogModule in SharedModule from @angular/material/dialog
Forked Stackblitz

