I am very new to AngularJS and working on an application where I have to open a new window (from another domain) and pass some data to the new window across domain. Can somebody provide me some working sample in angularJS to refer and complete the same. Thanks in advance.
Asked
Active
Viewed 427 times
0
-
Do you know JS? Not angular, just JS. Because this is native functionality. Take a look at http://stackoverflow.com/questions/1830347/quickest-way-to-pass-data-to-a-popup-window-i-created-using-window-open – CerebralFart May 11 '16 at 10:07
-
Will this solution work cross domain? I have tried for same application it works but did not work across domain. – Chinmayajeet Ojha May 11 '16 at 11:49
-
For cross-domain you would need to use some AJAX, URL-params, or some more exotic solution. Sorry I didn't read the question correctly. – CerebralFart May 11 '16 at 11:56
-
But how do the domains differ? – CerebralFart May 11 '16 at 11:57
-
Any pointers or sample code would be really helpful. – Chinmayajeet Ojha May 11 '16 at 11:57
1 Answers
2
If I understood your question properly then you can achieve this by following ways:
- Through URL Parameters
- Using subdomain-less cookie if you are talking about subdomains
- Using cross-domain localStorage
- cross-domain cookie

Shubham Takode
- 525
- 8
- 24