简体   繁体   中英

How to send form data to a independent component which opens using window. Open

I have to send the form data( on button click) to a another component which don't have any relationship.

Now my requirement is i need to send this form data to another window where the component loads using window.open.

Now please tell me how can i use window.open to send this form data to another page??

Thanks in advance.

One way could be to use a shared service.

Component 1 sends form data to -> Service eg via subscription.

On window.open Component 2 subscribes to -> Service to check if there is data.

https://enlear.academy/sharing-data-between-angular-components-f76fa680bf76

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM