I know this question has been asked here several times but I couldn't be able to find the perfect working solution.
I am trying to embed my Angular 4 application url inside the Iframe :
<html>
<body>
<iframe src="http://localhost:4300/login" height="200"></iframe>
</body>
</html>
But, as soon as I open this page, I can't see my application running. I found that the issue is related to the CORS, but I could not be able to figure out the exact solution for this.
On my browser console I am getting the below error:
ERROR DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at t._loadLevel (http://localhost:4300/vendor.0a81172ada1f31f3dc62.bundle.js:1:927903)
Existing similar questions:
How to open a iframe link within the same iframe?
how to resolve iframe cross domain issue
https://github.com/apollographql/apollo-client-devtools/issues/106
https://github.com/disconnectme/disconnect/issues/315
Please help me on this.