本文介绍了将 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-forwardngUpgrade重写.

我正在考虑重写它,但有一个转折.

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 中的 upgrade 模块旨在使增量升级无缝.

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.

有关更多信息,请参阅Angular 开发人员指南 - 从 AngularJS 升级

PLNKR 上的演示

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

09-25 20:43