this.dialogRef = this.dialog.open(someComponent, {
data: {
myInfo: infoId
}
});
//on the MatDialog component
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Inject } from '@angular/core';
constructor(
@Inject(MAT_DIALOG_DATA) public data: any
) { }
ngOnInit() {
// will log the entire data object
console.log(this.data)
}