title: Inetgrate and Communicate multiple Angular applications on same page (SPA)
body: <p>I just start thinking about communication between two angular (or others framework) applications - what is the best way to do that.  </p>
  
  <p>For now, in my application, I used <code>iframe</code> to include the second app and then thanks to <code>postMessage</code> (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage" rel="nofollow noreferrer">docs</a>) I can handle actions between apps.</p>
  
  <p>But this solution is getting <strong>really hard</strong> to maintain because I didn't expect at the begging that I will have to handle soo much type of events.</p>
  
  <p><strong>Let's give you an example:</strong>
  On Facebook when you go to someone profile you can click "Send message" and it will open a new window on chat application. In other way you can also click on some button in their chat and it will send some action to "main" application.</p>
  
  <p><img src="https://i.ibb.co/km43d62/On-Paste-20190612-155034.png" alt="facebook open chat screenshot"></p>
  
  <p>I just read few articles and start thinking about using <code>WebSockets</code>, using firebase etc but I want to make some more research and ask more expired developers (yes, you! :) ) what they thinking.</p>
  
  <p>So, my question is:</p>
  
  <ol>
  <li>What is the best approach to include two (or more) angular apps?</li>
  <li>What is the best approach to handle communication between these apps?</li>
  </ol>