title: angular material dialog imports probleme
body: <p>Good morning,</p>
  <p>I want to display the dialog of angular material but I have a problem with the imports I do not understand the problem.</p>
  <p>and of course I have an angular material module where I imported matdialog and I imported that in app.module</p>
  <p>errors : <strong>ERROR Error: Uncaught (in promise): Error: Type DialogFormComponent is part of the declarations of 2 modules: AppModule and ProduitsModule!</strong></p>
  <p><strong>app.module</strong></p>
  <pre><code>import { DialogFormComponent } from './produits/dialog-form/dialog-form.component';
  
  @NgModule({
    declarations: [
      AppComponent,
      DialogFormComponent
    ],
    entryComponents: [DialogFormComponent],
  </code></pre>
  <p><strong>produits.ts</strong></p>
  <pre><code>export class ProduitsComponent implements OnInit {
  
    public productArray: Produit[] = [];
  
    constructor(public dialog: MatDialog) { }
  
    ngOnInit() {
    }
  
    openDialog() {
      this.dialog.open(DialogFormComponent);
    }
  
  }
  </code></pre>