角度2.0:从角度1.x的迁移路径 [英] Angular 2.0: Migration path from Angular 1.x

查看:135
本文介绍了角度2.0:从角度1.x的迁移路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是在寻找一个意见 - 只是一个坚实的移民策略。



我们开始设计一个新的项目,指定使用Angular我们以前的这个项目的重要性非常高,它将会生活和维护至少3-4年。



Angular 2.0将在2015年底而且似乎所有的事情都要改变,$范围是出来的,指令出来,整个DI概念即将改变。


  1. 在接下来的几个月
    个月中是否有考虑迁移路径/策略?

  2. 如果我们使用1.x构建项目,在开发过程中需要采取哪些措施才能确保清理迁移?

  3. 这两个版本是否可以被认为是2个不同的框架? (是的意思是Angular 1.x将继续被google支持和发展)


解决方案

在2015年的ng-Conf,Angular团队讨论了这个的初步概念。要注意的重要事项:


  1. 您将能够混合和匹配Angular 1和Angular 2模块,以便您可以逐步将您的应用程序移动到Angular 2。

  2. Angular 2将使用TypeScript / ES7编写,因此可能会帮助您使用这些语言并将其转换为ES5用于当前的应用程序。虽然您可以在角度2中使用ES5,但是有些类似于类结构和注释/装饰器可能会使Angular 2更容易使用。

  3. 迁移说明将在Google通过迁移其中一个内部应用程序的工作。其他人可能会增加他们的投入,因为Angular 2变得更加稳定。

有关ng-Conf的更多信息,请参阅以下视频: / p>


I'm not looking for an opinion - just a solid migration strategy.

We started to design a new project that designated to be built with Angular as each of our previous, the importance of this project is very high and it's going to live and maintained for at least 3-4 years.

Angular 2.0 is coming in the end of 2015 and it seems like everything is about to change, $scope is out, directives are out and the whole DI concept is about to change.

  1. Is there a migration path/strategy to be considered in the next few months?
  2. If we built the project using 1.x, what action do we need to take during development to ensure a clean migration?
  3. Are those 2 versions can be considered as 2 different framework? (Yes means Angular 1.x will continued to be supported and evolved by google)

解决方案

At the 2015 ng-Conf, the Angular team discussed initial concepts for this. Important things to note:

  1. You will be able to mix and match Angular 1 and Angular 2 modules so that you can incrementally move your app to Angular 2.
  2. Angular 2 will be written using TypeScript/ES7 so it may help you to use those languages and transpile them to ES5 for your current app. While you can use ES5 in Angular 2, there are things like class structures and annotations/decorators that may make working with Angular 2 easier.
  3. Migration instructions will be publish after Google has gone through the work of migrating one of it's internal applications. Others are likely to add their input as Angular 2 becomes more stable.

For more information from ng-Conf see the following videos:

这篇关于角度2.0:从角度1.x的迁移路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆