https://stackblitz.com/edit/angular-gd5gcg?file=app/dialog-overview-example-dialog.html
In this example of the official documentation, I see that the value returned when you close the matdialog is this
<button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button>
But what happens if you want to send a value calculated in a function previously for example like this
getData(){
this.datos=[1,2,3,4];
}
How can you make that function be called before returning the value to the component that opened the matdialog?
Thanks