Hi,
I have a use case to make modal window feature to be auto close if no activity more than minutes i.e. 1 minute : https://ko.infragistics.com/products/ignite-ui-angular/angular/components/dialog
Does any good practice example how to implement it on Infragistics UI on angular ?
Thanks
HDi
Hi Achmad,
One way to achieve auto closing of the dialog is to use setTimeOut. You can start the timer in opening event of the dialog like this:
this.dialog.opening.subscribe(e => { setTimeout(e => { this.dialog.close(); }, 1000);
You can add this logic in your component's ngOnInit life cycle hook. Note, do not forget to clear the time out, nice place to do this is dialog's closing event, as well as remove all the subscriptions.
Here is a small sample showing how you may achieve all this - IgxDialog Auto Close.
Please let us know if any additional questions on this matter arise.
Milko Venkov
Software Developer