简体   繁体   English

替代单人水疗

[英]Alternative to Single-spa

We have huge enterprise application written in angularjs.我们有用 angularjs 编写的庞大的企业应用程序。

Now we have to migrate to angular, so we have ruled out an option of hybrid approach angular suggests using "ngUpgrade".现在我们必须迁移到 angular,因此我们排除了 angular 使用“ngUpgrade”建议的混合方法选项。

So now we are creating a new application in angular, which means we have 2 applications "angularjs(old)" and angular(new).所以现在我们正在用 angular 创建一个新的应用程序,这意味着我们有 2 个应用程序“angularjs(old)”和 angular(new)。

So to switch between these two applications can be done without refresh using angular-spa.因此,可以使用 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).我试图找到是否有另一个框架,在两个应用程序之间导航时无需刷新(无需通过导航到新 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.可能的解决方案:使用新的 Angular 应用程序作为包装器,然后根据上下文使用iframe显示您想要的应用程序 - 旧的或新的。 The issue you might face is changing the iframe, but I guess you can use postMessage to communicate between the apps.您可能面临的问题是更改 iframe,但我想您可以使用postMessage在应用程序之间进行通信。

A bit more sophisticated: Use Angular Elements to create your hybrid app.更复杂一点:使用Angular Elements创建您的混合应用程序。 I really recommend you to watch Erin talks from the last Angular connect about how Google made the migration from js to Angular.我真的建议您观看Erin在上一次 Angular 连接中关于 Google 如何从 js 迁移到 Angular 的演讲

I've recently tried the micro-frontend architecture described here: https://www.martinfowler.com/articles/micro-frontends.html我最近尝试了这里描述的微前端架构: https : //www.martinfowler.com/articles/micro-frontends.html

Each app on different code repository, runtime build and quite easy to implement.每个应用程序都位于不同的代码存储库、运行时构建并且非常容易实现。 Take a look :)看一看 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 single-spa - 如何在不使用 SystemJS 的情况下加载 Angular 应用程序 - single-spa - how to load an Angular app without using SystemJS 使用AngularJS和Sitecore(SPA)构建单页应用程序 - Building a Single Page Application with AngularJS and Sitecore (SPA) 概念说明SPA(单页应用程序) - Concept explanation SPA (Single Page Application) Angular JS - 非单页SPA的路径 - Angular JS - Route to Non Single Page SPA PageSpeed服务/库如何帮助单页应用程序(SPA)? - How does PageSpeed Service/Library helps a Single Page Application (SPA)? 单页应用程序(SPA - Angular)和身份验证最佳实践? - Single Page App (SPA--Angular) and Authentication Best Practices? 为单页应用程序 (SPA) 创建链接以登陆不同的选项卡 - create a link for a single page application (SPA) to land on different tab 每页单服务器请求与SPA应用程序 - Single Server request per page vs SPA Application 将 css 从父应用程序(角度)中排除在单水疗应用程序中的子应用程序(反应)中 - Exclude css from parent application(angular) from applying into child(react) in single-spa-application 使用单页应用程序(SPA)时如何在不刷新浏览器的情况下处理过期文件? - How to handle expired files without refreshing the browser when using Single Page Application (SPA)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM