How to embed external urls in angular?
I'm trying to embed an external url inside my angular app using iframe. This is what I'm getting. and the error says that: Following is the template in which I'm trying to embed an external url <iframe height="500" width="100%" [src]="url | safe" frameborder="0"></iframe> // url = `https://fonts.google.com/`; // this is a dummy url. this url will be replaced by a page on my another website (owned by myself but different domain) Following is the pipe used to bypass security risk: @Pipe({ name: 'safe', }) export class SafePipe implements PipeTransform { constructor(private sanitizer: DomSanitize
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.