@rollin
To set an iframe in an Angular component, you can use the following steps:
1
|
<iframe src="https://www.example.com" width="500" height="400"></iframe> |
1
|
<iframe [src]="iframeSrc" [width]="iframeWidth" [height]="iframeHeight"></iframe> |
1 2 3 4 5 |
export class MyComponent {
iframeSrc: string = "https://www.example.com";
iframeWidth: number = 500;
iframeHeight: number = 400;
}
|
That's it! You have successfully set up an iframe in an Angular component.