简体   繁体   中英

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 . The whole website is made in Angular.

What I need to do is I need to include this website into another HTML webpage. I need to include this website into another div container of a new HTML page.

I need to do something similar to this. I am including a new URL into a div in a new webpage

...........
<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?

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.

How can I achieve this?

You can embed it inside an <object> tag using this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM