BrowserAnimationsModule in the module where you would like to use the
2. Declare the dialog component (
ExampleDialogComponent in this example) both as
declarations and also as
Mostly people forget the
3. Invoke the
mat-dialog from the parent component with the variable that is of type
4. [OPTIONAL] Declare
dialogRef in the dialog component to access
mat-dialog methods from the dialog component, and inject
MAT_DIALOG_DATA if you want to pass some data from the parent component to the dialog component .
One more check
Make sure the application is loaded with a
Do let me know if my article needs correction / improvement. TIA.