Steve B
Steve B

Reputation: 257

How do I embed an Angular 6 App into my HTML page

I have written an Angular 6 Application (hereafter called "The App") which makes API calls to my server for CRUD type operations. Meanwhile, I have an existing application which presents old-school HTML 's to our users. For our Support Team, I would like to embed The App so they can go straight to the database to FIX bad data. My design is to add an icon to the page which, when clicked, opens The App in a Modal. I don't know if it is relevant, but The App does not need to pass data back-and-forth with the hosting page. I cannot figure out how to achieve this.

Based upon my Google search, I first looked at "Angular Elements", but The App uses routes which I have read is not (yet) supported by Angular. At least one POST hinted that Routes might be coming - is this available?

Another option I found was to implement single-spa-angular-cli, but I have found the instructions disjointed and/or incomplete (for example, the README.md says create loader.js, then directs me to a sample application which includes no such file.)

So, before I start posting questions about single-spa-angular-cli, I thought I should first ask if this is the best way to add The App to my HTML page?

Thanks!

Upvotes: 1

Views: 2968

Answers (1)

Arne
Arne

Reputation: 842

You could simply embed the app? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed

Or, I never thought I'd ever suggest this... use an old fashioned iframe

Upvotes: 1

Related Questions