I\'m trying to use a dialog component in Angular 2 using @angular/material2.0.0-beta.1
. What I\'m trying to accomplish is to send data (which are values that a
Another way to do is to set the values from within the parent component DialogComponent
@Component({
selector: "dialog",
templateUrl: "./dialog.component.html"
})
export class DialogComponent {
constructor(public dialogRef: MdDialogRef) { }
type: string;
name: string;
ngOnInit(): void {
}
}
ParentComponent
let dialogRef = this.dialog.open(DialogComponent);
dialogRef.componentInstance.type= title;
dialogRef.componentInstance.name= url;