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