angular 4 发布后,如何使用 angular cli 创建特定的 angular 2.4 版本应用程序 [英] After angular 4 release, how to create specific angular 2.4 version app using angular cli
问题描述
Angular 4 发布了,我想先学 Angular 2.为此,我尝试使用 angular CLI,但是当我使用
Angular 4 has released, I want to learn angular 2 first. For that i tried to use angular CLI, but when i create new app using
ng new test-app
它创建了 angular 4 版本的应用程序.我应该使用哪个命令来专门创建 angular 2.4 应用程序.
It creates the app the angular 4 version. Which command should i use to create specifically angular 2.4 app.
推荐答案
为什么要先学习 Angular 2?Angular 4 基本上是 Angular 2,但有一些改进和变化.Angular 使用 语义版本控制,因此 4.0 基本上意味着进行了一些不兼容的 API 更改.我想也许你期望 Angular 2 和 Angular 4 之间的区别类似于 Angular 1 和 Angular 2 之间的区别?事实并非如此.Angular 2 是完全重写的——如果 Angular 没有使用语义版本控制,Angular 4 基本上就是 Angular 2.5.x.因此,如果您现在正在学习 Angular,我建议您使用 4.x
Why would you want to learn Angular 2 first? Angular 4 is basically Angular 2 with some improvements and changes. Angular uses semantic versioning so 4.0 basically means some incompatible API changes were made. I think maybe you expect the difference between Angular 2 and Angular 4 is similar to the difference between Angular 1 and Angular 2? That is not the case. Angular 2 was a complete rewrite - Angular 4 is basically Angular 2.5.x if Angular wasn't using semantic versioning. So if you are just learning Angular now, I'd suggest going with 4.x
另请查看 发布时间表 Angular 以进一步了解(每年计划 2 个主要版本).
Also check out the release schedule for Angular for further understanding (2 major versions planned per year).
这篇关于angular 4 发布后,如何使用 angular cli 创建特定的 angular 2.4 版本应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!