title: use component without MatDialog, MatDialogRef<SomeComponent>
body: <p>I have a function that opens a MatDialog with a component called 'NoteFormComponent' it looks like this</p>
  
  <pre><code>  openForm() {
      let dialogConfig = new MatDialogConfig();
      dialogConfig.autoFocus = true;
      dialogConfig.width = "95%";
      dialogConfig.panelClass = "form-dialog";
      dialogConfig.scrollStrategy = new NoopScrollStrategy();
  
      this.dialog.open(NoteFormComponent, dialogConfig).beforeClose().subscribe(() =&gt; this.getNotes());
    }
  </code></pre>
  
  <p>I pops up a modal containing the 'NoteFormComponent'.
  <strong>So WHAT is the problem?</strong></p>
  
  <p>The problem is that I want to <strong>use 'NoteFormComponent' without a MatDialog</strong>, but in order to use it with the MatDialog I had to inject a reference in the component's constructor like this</p>
  
  <pre><code>  constructor(
      private noteService : NoteService, 
      private productService : ProductService,
      private categoryService : CategoryService,
      private clientService : ClientService,
      private notification : NotificationService,
      private dialogRef : MatDialogRef&lt;NoteFormComponent&gt;, /*This Reference*/
      private loader : LoaderService,
      private sessionService : SessionService,
      private securityBlockerService : SecurityBlockerService,
      private dialog : MatDialog,
      private dialogService : DialogService
    ) { }
  </code></pre>
  
  <p>And if I try to use the component with the template selector '' it throws an error that <strong>there is no provider for MatDialogRef</strong>, the only thing that comes to my mind is create a copy of the 'NoteFormComponent' but without the MatDialogRef injector in the constructor.</p>
  
  <p>Is there anyway to solve or work around this problem?</p>