0

I got a angularjs app with ui-router and a angular 4 app with angular router.

We are refactoring the old to the new but in the mean time i would like to link/bring the old app to the new one.

So the idea is that in the new app (angular 4) we got a router-outlet, and i'm wondering if it could be possible to load the angularJS directly in the router-outlet, like an iframe would do.

The new app need to be able to show the old app, ideally directly in place so in the router-link. It could work also to have a hook on the rooter to do a url redirection for some state (the one that correspond to the old app)

I'm not an angular pro, i hope that i make sense and that you can help me.

Thanks

edit to precise: thanks for the link but that's not my need, this is closer to my need : How to redirect to an external URL from angular2 route without using component?

because the thing i wanna load is actually an external url, but ideally i would load it inside a router-outlet

bobzer
  • 99
  • 1
  • 7
  • https://blog.angularjs.org/2015/08/angular-1-and-angular-2-coexistence.html – Heretic Monkey Feb 02 '18 at 21:59
  • 1
    Possible duplicate of [How to use angular 1.3.4 and angular 2 together](https://stackoverflow.com/questions/37406678/how-to-use-angular-1-3-4-and-angular-2-together) – Heretic Monkey Feb 02 '18 at 21:59
  • 1
    "redirecting to an external URL" isn't the same as loading the content from the URL in a router-outlet. Loading in a router outlet is more like using it as a template, and, unfortunately, if the template is using Angular 1.x, you'll have to treat it the same as you would any other angular 1.x content in an angular 2 app, i.e. `ng-upgrade`. – Claies Feb 03 '18 at 00:34
  • thanks for this precision, actually i'm trying to do one or the other, i don't know what way is the best, i would prefere the router-outlet but because of all the refactoring it would take, i think the redirection to an external url would be the easiest way to do the transition. so that's why i try to rediect to external url which is actually the version 1 of the new system – bobzer Feb 04 '18 at 00:58

0 Answers0