Hi i am trying to load html file into iframe, but it is not working, If i load any external url it is working
in Component.ts
name = 'Set iframe source';
url: string = "./add-cardIframe.component.html";
urlSafe: SafeResourceUrl;
in oninit
ngOnInit() {
this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
}
HTML File:
<iframe width="100%" height="100%" frameBorder="0" [src]="urlSafe"></iframe>
getting error as Cannot match any routes. URL Segment: 'add-cardIframe.component.html' any help on this issue would be great