1

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.

3
  • Are you using Angular Universal? Commented Apr 10, 2017 at 18:47
  • no, I am not using angular universal Commented Apr 10, 2017 at 18:58
  • What kind of file is that? Plain HTML? Does it contain Angular2-specifing bindings, components, ...? How do you want to display it? Commented Apr 10, 2017 at 20:57

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.