Using external url in ng-include in AngularJS

↘锁芯ラ 提交于 2019-12-05 06:24:19

It sounds like you really just want to host the external site inside your view, and then you should just link it in an iframe.

<iframe src="http://www.w3schools.com"></iframe>

If you want something magic/dynamic stuff to happen, you will need to parse the content and rewrite the urls, attach handlers etc. The reason your ng-include does not work like expected is because it only reads the content of that url and embeds it into your view "as-if" it was just a template you made (including angular markup) and wanted to host externally for some reason.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!