Make dialog be initially closed

I have a component that has a modal dialog (ejs-dialog). When the component is rendered, the dialog is opened automatically because the dialog component's open event is triggered. How can I prevent the dialog from being opened when the view is initialized? I don't want the dialog to open until the appropriate button is clicked.

1 Reply

IS Indrajith Srinivasan Syncfusion Team April 8, 2020 11:22 AM UTC

Hi Mark,

Greetings from Syncfusion support,
 
 
We have validated your reported query. Yes, you can prevent the dialog from initially open by using the visible property. Setting the visible property to false prevents the dialog from showing it initially. We have also prepared a sample based on your requirements.

API link: https://ej2.syncfusion.com/angular/documentation/api/dialog#visible

Sample: https://stackblitz.com/edit/angular-nvf4zk-pthfn6?file=app.component.ts

Regards,
 
Indrajith 


Loader.
Up arrow icon