Open JeffinBao opened 4 years ago
I found one working approach which is to register an event listener and record the dialog id. This approach was found in the documentation.
$rootScope.$on('ngDialog.opened', function (e, $dialog) { console.log('ngDialog opened: ' + $dialog.attr('id')); });
However, I wonder if there is another way to close the dialog opened by openConfirm() method? By the way, I am opening the dialog in an interceptor, not a controller. Any idea would be appreciated. Thanks!
Since openConfirm() returns a promise, I can not get dialog id as open() method returning an object. Then how can I only close the dialog created by openConfirm() method in JS? I've tried a lot of approaches, all of them didn't work.