user1364649
user1364649

Reputation: 113

Angular 1 app inside Angular 2

Using Angular 2 app as the parent app, is there a way to load multiple Angular 1.x apps inside the parent app?

Note: Upgrading the Angular 1.x apps is not a viable option (business).

Upvotes: 1

Views: 132

Answers (2)

Aravind
Aravind

Reputation: 41581

There are two options viz.,

  1. You can have them separate end points and point to them when needs to be redirected.
  2. You need to wrap angular 2 inside angular 1, as things progress your angular1 will be removed.

Reasons for point 2:

  1. Angular1 does not know sophisticated features as it is angular2.
  2. The route of angular2 expects a Component, which is not possible to create using a angular1.

Upvotes: 0

Jason
Jason

Reputation: 1376

You can load the angular 1 apps in iframes. If they need to communicate you can use window.postMessage to talk back and forth. I am currently doing something similar and it works quite well.

Upvotes: 1

Related Questions