34

can you please let me know the differences between angular2 and angular4. We know that there is a drastic change between angular1 and angular2. Is it repeated again for angular4.

mahesh peddi
  • 787
  • 3
  • 8
  • 21
  • 4
    No, did you read anything before coming here asking? It's just a new major version of 'Angular 2', which should just be called 'Angular'. The old Angular should be called 'AngularJS'. – Arg0n Apr 05 '17 at 07:34
  • @Arg0n but google search engine doesn't show the different till now, when you google angular all links are related to angularjs – ketimaBU Jul 20 '17 at 21:37

1 Answers1

46

There is nothing path breaking between angular 2 and angular 4 like angular 1 and angular 2. They are just doing it to maintain SEMVER(Sementic Versioning). Angular 2 is stable now so it would be better to prefer angular 2 instead of angular 4.

Angular 2 was a complete rewrite of AngularJS 1.x with many new concepts. Angular 4 however is the next version of Angular 2. The underlying concepts are still the same and if you have already learned Angular 2 you’re well prepared to switch to Angular 4 now.

The reason it’s Angular 4 and not Angular 3 is that the Angular Router package has already been in version 3 before. The Angular team would like to avoid confusion and decided to skip version 3 for Angular and continue with Version 4.

Update from comments

  • Also, in Angular 4, animation functions are imported from @angular/animations instead of @angular/core

For more detail i have published this article read here

Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
  • 2
    I agree with everything in the answer except the advice to stick with Angular 2 for now. Today they will release 4.0.2 which is the third production release. I find that in my projects, Angular 4 is just as "stable" as Angular 2. Any wrinkles you may encounter will no doubt be ironed out before anything you will write to day will make it into your own production environment. Writing code for the last version only means that that code will break sooner in the future, when Angular 6 is released. – IndyWill Apr 05 '17 at 15:14
  • 1
    you can watch the changes in angular4 here https://github.com/angular/angular/blob/master/CHANGELOG.md – mahesh peddi Apr 08 '17 at 05:45
  • 1
    Upto 60% reduction in Produced code, Introduced parameterMap in routing, Introduced Animation Packages, – Amarnath R Shenoy Mar 26 '18 at 09:11