Using PostMessage in an AngularJS Application
Written by Simon Bailey
window.postMessage is a method for safely enabling cross-origin communication.
I have created an example demonstrating communication between a wrapper and an AngularJS application within an IFrame using postMessage. Message communication in and out of the IFrame are managed within an attribute directive. Unit tests for the directive, controller and service are in place but no e2e just yet. Project specifics are detailed within the README.md in the GitHub repos. Any optimisations or feedback would be welcomed.