title: Get IFrame img in angular 6
body: <p>I have an iframe in my Angular app. The iframe has an image in base64 format. Now I am trying to get that image’s base64 code and store it in a variable in the parent page/Angular app. Can anyone assist, please? I found this article</p>
  
  <p><a href="https://stackoverflow.com/questions/52170003/how-to-get-data-from-iframe-with-angular-6">How to get data from Iframe with Angular 6</a></p>
  
  <p>Here is my HTML code for the iframe</p>
  
  <pre><code>&lt;iframe src="http://eohdigitalappstore.co.za/test/test.html"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>I managed to get a bit further by being able to get elements in the iframe page but am now trying to get to the image in the elements tree</p>
  
  <pre><code>const doc =  this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
  console.log(doc.body);
  </code></pre>
  
  <p>I can get to point in the HTML elements tree which looks like below
  <a href="https://i.stack.imgur.com/uMvnm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uMvnm.png" alt="enter image description here"></a></p>