Skip to content

Instantly share code, notes, and snippets.

@lsg-vtaran
Created June 9, 2023 08:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lsg-vtaran/2b946f0be33cfc7e1e06fef901eda954 to your computer and use it in GitHub Desktop.
//app.component.ts
this.trustedResourceUrl = this.sanitizer.bypassSecurityTrustResourceUrl("https://www.google.com/images/branding/googlelogo/1x/googlelogo_light_color_272x92dp.png");
//app.component.html
<iframe [src]="trustedResourceUrl"></iframe>
//result
<img _ngcontent-nre-c12="" src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_light_color_272x92dp.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment