8

How to include a angular app in a non-angular app by using a iframe? Must be able to use angular app through this iframe with all routing still working. Is it possible? or Am I thinking wrong? Feel free to correct me. Thanks in advance.

1 Answer 1

7

iFrame is a complete DOM. As per MDN: Each embedded browsing context has its own session history and active document.

With that in mind, angular apps will work just fine inside an iFrame.

General syntax: <iframe src="url_to_your_angular_app"></iframe>

Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

Sign up to request clarification or add additional context in comments.

2 Comments

I added iframe just like you suggested. It's working !!
is there a way to pass a value to the angular app? like querystring

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.