The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
Send messages to parent window using window.parent.postMessage
Recieve messages using window.addEventListener('message')
@ChandranaRDeshmukh96 Angular separates components in a way that makes it a difficult for them to access each other. Something like
document.querySelector('#iframe-id')
should still work though. Otherwise, you may have to make a service to give yourself access to that iframe element.