本文介绍了将AngularJS迁移到Angular 4,5(使用DEMO)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究将当前Angular 1项目迁移到Angular 4的方法。

I am looking into ways of migration a current Angular 1 project to Angular 4.

选项 ng-forward ngUpgrade 重写

我正在考虑重写它,但有一点麻烦。

I am thinking on rewriting it but with a twist.


  • 我保留当前的申请

  • 开始写一个平行的新的

  • 全新的NG4重写,我想用......所以一点一点地换句话说。

有没有人试过这个或者知道更好的方法?

Has anyone attempted this or know a better way?

推荐答案

将AngularJS应用程序逐步升级为Angular。



一成功升级的关键是通过在同一个应用程序中并行运行两个框架来逐步进行,并逐个将AngularJS组件移植到Angular。这样就可以在不中断其他业务的情况下升级大型复杂应用程序,因为这项工作可以协同完成并在一段时间内完成。 Angular中的升级模块旨在实现无缝增量升级。

Incrementally upgrade an AngularJS application to Angular.

One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the same application, and porting AngularJS components to Angular one by one. This makes it possible to upgrade even large and complex applications without disrupting other business, because the work can be done collaboratively and spread over a period of time. The upgrade module in Angular has been designed to make incremental upgrading seamless.

有关详细信息,请参阅

For more information, see Angular Developer Guide - Upgrading from AngularJS

这篇关于将AngularJS迁移到Angular 4,5(使用DEMO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 20:43