gurmeet johal
gurmeet johal

Reputation: 21

HTML rendering on angular 2

I have angular project running on one server, I have another html file on another server that I want to render on this angular project. My question is, how can display that html file on my current angular 2 project without bringing that file to angular project server? Please help...Let me know if question does not make sense.

Upvotes: 1

Views: 385

Answers (1)

Uniphonic
Uniphonic

Reputation: 865

Using an iFrame would be one way to do it: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

Just make an Angular page that only has an iframe in the content area, it which points to the HTML file on your other server.

<iframe src="https://mdn-samples.mozilla.org/snippets/html/iframe-simple-contents.html" width="400" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

Upvotes: 1

Related Questions