0

As per the latest Angular2-Material docs of Dialog Component . There is no description on how to pass values to dialog component. Is it achievable via component interaction mechanisms? Apart from using a service.

In normal component interaction we had seen that we can pass the values this way:

<app-child [data]="some_data"></app-child>

@Input data:string;
Sumit Agarwal
  • 4,091
  • 8
  • 33
  • 49

1 Answers1

0

Found the Answer in a comment discussion:

this.dialogRef.componentInstance.param1 = "test value";

See Also: Working example of Angular 2.0 Material MdDialog with Angular 2.0

plnkr.co/edit/n185tQbEHg1xGlNCAdxQ?p=preview

Community
  • 1
  • 1
Sumit Agarwal
  • 4,091
  • 8
  • 33
  • 49