ngx-modal icon indicating copy to clipboard operation
ngx-modal copied to clipboard

onClose not working

Open MansoorJafari opened this issue 6 years ago • 2 comments

Hello I'm write this code

this.modalService.openDialog(this.viewRef, { settings: { modalDialogClass: 'modal-dialog' }, childComponent: ChequeFormComponent, data:id, onClose: () => new Promise((resolve: any) => { console.log('closed'); }) });

but after close modal event not worked.

MansoorJafari avatar Apr 26 '18 11:04 MansoorJafari

#16

I'm using this tutorial but I couldn't get data please help

MansoorJafari avatar Apr 26 '18 11:04 MansoorJafari

Hi, problem was you never resolved your promise.

Proper code would be:

this.modalService.openDialog(this.viewRef, { 
    settings: { 
      modalDialogClass: 'modal-dialog' 
    }, 
    childComponent: ChequeFormComponent, 
    data: id, 
    onClose: () => new Promise((resolve: any) => { 
      console.log('closed'); 
      resolve();
    }) 
});

meeroslav avatar Jun 11 '18 13:06 meeroslav