![](/img/trans.png)
[英]How to load (replace) an external page by the current (no inside a div)?
[英]How to load an external Angular app inside a div?
我需要创建一个用作小部件的单页应用程序日历 web 应用程序,因此客户可以将其插入到他们网站上的指定 div 容器中。 我怎样才能做到这一点?
Angular 是否适合这项任务?
试试下面的代码:
HTML: <div [innerHtml]="KisshtHtml"></div> Ts: name = 'Kissht'; KisshtHtml: any; constructor(private http:HttpClient, private sanitizer:DomSanitizer){ } ngOnInit(){ this.http.get('https://razorpay-dbf86.web.app/',{responseType:'text'}).subscribe(res=>{ this.KisshtHtml = this.sanitizer.bypassSecurityTrustHtml(res); }) }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.