How to I pass to an angular2 material dialogue component?
Here is the html to trigger:
<button md-raised-button color="primary" (click)="openDialog('stupid')">ADD GIT HOST</button>
Here is the TS:
openDialog(slug){
let dialogRef = this.dialog.open(DialogGitHost);
dialogRef.afterClosed().subscribe(result => {
//this.selectedOption = result;
});
}
How do I pass slug to the dialog on open so I can use it? e.g.
let dialogRef = this.dialog.open(DialogGitHost,slug);