title: How to open a MatDialog with data transmitted by the click on an movie image
body: <p>I'm trying to build a SPA of movies in Angular 9, that consumes data using TMDb api services.</p>
  
  <p>I've already created and consume the data, but when I'm trying to transmit the data to another component called <code>MoviePopupComponent</code>, but I have no idea how to do this...</p>
  
  <p><a href="https://i.stack.imgur.com/jRTjp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jRTjp.jpg" alt="getting data"></a></p>
  
  <p>I thought and tried to watch some videos about parent and child inheritance and using <code>@Input</code>, but I've failed trying to implement it.</p>
  
  <pre class="lang-js prettyprint-override"><code>export class MovieItemComponent implements OnInit {
    constructor(public apiService: ApiService, public dialog: MatDialog,){}
    @Input() movie: Movie;
    ngOnInit(): void {
    }
    openModal(movie){
      this.movieObject = this.apiService.getMovieClicked(movie); // Receive the object
      const dialogConfig = new MatDialogConfig();
      dialogConfig.disableClose = false;
      dialogConfig.autoFocus = true;
      dialogConfig.width = '80%';
      dialogConfig.height = '90vh';
      this.dialog.open(MoviePopupComponent, dialogConfig);
      this.movieObject.title}}
  </code></pre>