Hey there! I'm currently using the HTML code below to incorporate an iframe and display an external page hosted on the same domain so no need to worry about cross domain issues:
<iframe frameborder="0" [src]="url"></iframe>
Additionally, I have implemented the following TypeScript code to sanitize and load the content:
this.url = this.sanitizer.bypassSecurityTrustResourceUrl("/assets/static/page.html");
The issue I am facing is quite strange - after the page loads, the iframe initially shows a 404 error for a brief moment in localhost and for 2 to 3 seconds in production. It then proceeds to display the actual page content. This can be quite frustrating since Angular lacks proper support for iframe events such as page load or failure.