After angular 4 release, how to create specific an

2019-09-15 02:20发布

问题:

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

It creates the app the angular 4 version. Which command should i use to create specifically angular 2.4 app.

回答1:

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

Also check out the release schedule for Angular for further understanding (2 major versions planned per year).