简体   繁体   中英

Alternative to Single-spa

We have huge enterprise application written in angularjs.

Now we have to migrate to angular, so we have ruled out an option of hybrid approach angular suggests using "ngUpgrade".

So now we are creating a new application in angular, which means we have 2 applications "angularjs(old)" and angular(new).

So to switch between these two applications can be done without refresh using angular-spa.

I was trying to find if there is another framework, where navigating between two apps happens without refreshing(without refreshing entire page by navigating to new html).

Possible solution: Use a new Angular application as a wrapper, then just use iframe to show the application you want depends on the context - old or new. The issue you might face is changing the iframe, but I guess you can use postMessage to communicate between the apps.

A bit more sophisticated: Use Angular Elements to create your hybrid app. I really recommend you to watch Erin talks from the last Angular connect about how Google made the migration from js to Angular.

I've recently tried the micro-frontend architecture described here: https://www.martinfowler.com/articles/micro-frontends.html

Each app on different code repository, runtime build and quite easy to implement. Take a look :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM