[英]How to include my angular app/website in external html div container?
This is the URL of my website http://35.154.165.122/#/iLeadLandPage .这是我的网站http://35.154.165.122/#/iLeadLandPage 的 URL 。 The whole website is made in Angular.
整个网站是用Angular制作的。
What I need to do is I need to include this website into another HTML webpage.我需要做的是我需要将此网站包含到另一个 HTML 网页中。 I need to include this website into another
div
container of a new HTML page.我需要将此网站包含到新 HTML 页面的另一个
div
容器中。
I need to do something similar to this.我需要做类似的事情。 I am including a new URL into a div in a new webpage
我在新网页的 div 中包含一个新的 URL
...........
<div id="gabriel-embed" style="min-height: 800px;">
<script src="https://embed.gabrielny.com/eshopreact.js?key=1d767b46-27e8-4b05-8abf-776514fc9771&division=fashion&noframe=1&attachTo=gabriel-embed&eager=1"> </script>
</div> ............
How can I do this for my Angular app?如何为我的 Angular 应用程序执行此操作?
I need to replace the src
in this with my Angular app's IP so that whenever I make a new HTML file the component get loaded.我需要用我的 Angular 应用程序的 IP 替换其中的
src
,这样每当我创建一个新的 HTML 文件时,组件就会被加载。
How can I achieve this?我怎样才能做到这一点?
You can embed it inside an <object>
tag using this:您可以使用以下方法将其嵌入到
<object>
标记中:
document.getElementById("gabriel-embed").innerHTML=<object type="text/html" data="http://example.com"></object>
Be aware of using the same protocol (HTTP/HTTPS) for both resources, otherwise the browser won't allow this请注意对两种资源使用相同的协议(HTTP/HTTPS),否则浏览器将不允许这样做
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.