shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 241 forks source link

Getting data from the modal component #411

Closed kevintanhongann closed 6 years ago

kevintanhongann commented 6 years ago

I can't wrap my head around how to get data from a custom modal component that was triggered from a component.

Are there any concrete examples on how I can do this?

Thanks.

GerritK commented 6 years ago

You can send a result with dialog.close(result). If you want to send data without closing the modal I would add an EventEmitter to the modal context and emitting data like you would do with an @Output().

kevintanhongann commented 6 years ago

Okay cool. Thanks for the quick response. You've helped me out.