there a popup, which should include multiple component using the "" with assinged id. it's not working. I am trying to add a selected 'header' inside the div containing a border. but not working. I am much confused. need the help.
click on open button.
app.ts
export class AppComponent {
@ViewChild('childTemplate') childTemplate: TemplateRef<HTMLAllCollection>;
constructor(public dialog: MatDialog) {}
openDialog() {
this.dialog.open(HelloComponent, {
data: {
name: 'popup',
pagecontent: this.childTemplate,
},
});
}
}
pop component:
export class HelloComponent implements OnInit {
constructor(@Inject(MAT_DIALOG_DATA) public data: any) {}
ngOnInit() {
console.log(this.data);
}
}
Thanks in advance