Answers for "NullInjectorError: No provider for MatDialogRef!"

1

NullInjectorError: No provider for MatDialogRef!

import {DialogService} from './services/dialog.service';
  import {MatDialogModule, MatDialogRef} from '@angular/material/dialog';
  ...
  imports: [
    ...
    MatDialogModule
  ],
  providers: [
     {
       provide: MatDialogRef,
       useValue: {}
     },
     DialogService
  ],
  ...
Posted by: Guest on April-21-2021

Code answers related to "NullInjectorError: No provider for MatDialogRef!"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language