Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onClose not working #23

Open
MansoorJafari opened this issue Apr 26, 2018 · 2 comments
Open

onClose not working #23

MansoorJafari opened this issue Apr 26, 2018 · 2 comments

Comments

@MansoorJafari
Copy link

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
Copy link
Author

#16

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

@meeroslav
Copy link
Collaborator

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();
    }) 
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants