title: Communication between angular 2 and pure javascript
body: <p>I am building an angular application and i am in a situation where i have to communicate with an external javascript. </p>
  
  <p><strong>Scenario</strong>
  During app initialization, i inject two iframes into index.html using</p>
  
  <pre><code>document.body.appendChild(iframe);
  </code></pre>
  
  <p>I have script running in index.html and has a multiple functions among which one is getData();  I have to send data to this function from the angular app component when the app initialises. How to go about this ? I know how to communicate from javascript to angular but not the other way round. Please help me. I am struck.</p>