我正在使用Core UI模板在Angular 7上进行项目。我有一个用纯HTML编写的页面,它使用了一些JavaScript,当用户单击某些内容时,我想加载此页面。此页面不是角度模块/组件。我尝试加载另一个Angular模块,然后加载其中需要页面的html,但是它不起作用。我的直觉说这不是要走的路。我正在使用的代码如下所示:By clicking <span class="here" (click)="loadNonAngularPage()">here</span> you can load a non angular page.调用的函数是这样的: public loadNonAngularPage(){ this.router.navigateByUrl('/non angular page') }有任何想法吗?
1 回答

慕丝7291255
TA贡献1859条经验 获得超6个赞
<iframe>如果您仍想使用角度应用程序,则可以使用;window.location.href = '...';如果要更改为其他网页,则可以使用。
public loadNonAngularPage(){
window.location.href = '/non angular page';
}
添加回答
举报
0/150
提交
取消