Search code examples
angularangular2-components

How to load angular2 application or component via http


Is it possible to load an Angular2 application or component via http? What I'm looking for is something like that:

Template:

<app-local></app-local> <app-http></app-http>

AppComponent of app-local:

[...] loadComponent("http://someurl/", "http-app"); [...]

where app-http is an app or component from another url. After calling "loadComponent" the placeholder "http-app" should be replaced by the application. I don't know how to describe it better, but I hope someone understands what I'm talking about.


Solution

  • You can use iFrame for this task.