I want to pass data to a dialog but the way it should be done (according to several examples found on the internet, like Using MdDialogConfig data on Angular 2) does not work.
I get the following error:
Property 'data' does not exist on type 'MdDialogConfig'
When I look at the code of the MdDialogConfig this property indeed does not exists (anymore)
I used the example that can be found as the accepted answer to the topic above, but it doesn't work. The example code being:
const config = new MdDialogConfig();
config.data = [
// for example:
'value 1',
'value 2'
];
const dialogRef = this.dialog.open(DialogComponent, config);
Scanning the rest of the code, I see no other way to pass data directly. I could fall back to using a separate service to pass data from the component to the dialog but that is far from ideal.
Is there a proper way to pass data to a dialog?
I am using version 2.0.0-beta.1