Pretty new to AngularJS - try not to laugh. Having trouble understanding how to properly receive a window.postMessage
object in an AngularJS app.
There is an iframe
embedded in the AngularJS app page originating from a non-AngularJS app which calls window.postMessage
on the parent window in an attempt to send a message object to the AngularJS application.
I do receive the postMessage
event successfully, but the event.data
is not the message I sent as it is in other non-Angular apps - it looks like something the AngularJS framework created.
Why do I get this result? Is there a proper AngularJS way to successfully receive the message object I'm sending from the other window?
window.addEventListener("message", function(e) { //do stuff here }, false);
I want e.data
to be the message I sent from the embedded window.