title: Adjust height of Iframe according to content size in angular 2
body: <p>I want to adjust the height of my iframe according to its content size</p>
  
  <p>Here is my component file:</p>
  
  <pre><code>import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
  constructor( private sanitizer: DomSanitizer){}
  
   hideFeed(myFeed){
         this.iframeURL = this.sanitizer.bypassSecurityTrustResourceUrl( myFeed.contentUrl);     
  this.showIframe = true;
  </code></pre>
  
  <p>Here is my HTML file:</p>
  
  <pre><code>&lt;div class="container-fluid" *ngIf = "showIframe" &gt;
    &lt;div class="col-lg-12 col-md-12 col-xs-12" class="feedIframe"&gt;  
        &lt;iframe  scrolling="auto" frameborder="0"        
          style=" position: relative; height: 100%; width: 100%;"  [src]="iframeURL"&gt;
        &lt;/iframe&gt;
         &lt;a (click) = "refreshPage()" class="button"&gt;
            &lt;span style="color: #555;" &gt;BACK&lt;/span&gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>