Thank you for the reply and the example. I've put together an example of my own that may show more clarification. Ideally, I'm looking for something more robust that can be handed a component type and have that rendered in the content area of the dialog.
On line 30 of src/app.ts, notice I'm calling my createDialog function using ChildComponent as the first parameter. Ideally, I'd like to render ChildComponent (or any other component type) in the content area of the Dialog.
Important to note, in my actual project, I'm referencing the @syncfusion/ej2-ng-popups package rather than the @syncfusion/ej2-popups package.
It would also be ideal if when creating the Dialog from TypeScript, if the dialog could just be shown and instantiated without having to do DOM manipulation, e.g., without all this:
var ele=document.createElement('div');
ele.setAttribute('id','modalDialog');
if(document.getElementById('modalDialog') == null) {
var newtarget=document.getElementById('target');
newtarget.appendChild(ele)
dialogObj.appendTo('#modalDialog');
}
else {
dialogObj.appendTo('#modalDialog');
}
Something cleaner, like with the Angular Material dialog:
constructor(public dialog: MatDialog) {}
openDialog(): void {
let dialogRef = this.dialog.open(DialogOverviewExampleDialog, {
width: '250px',
data: { name: this.name, animal: this.animal }
});
dialogRef.afterClosed().subscribe(result => {
console.log('The dialog was closed');
this.animal = result;
});
}
Thank you.