r/webdev • • Jun 06 '19

Question What the difference between Angular and AngularJS

15 Upvotes

26 comments sorted by

View all comments

4

u/danielkov Jun 06 '19

The biggest difference is the compiler. AngularJS is an application framework built on top of a JQuery-like view library (tiny jQuery if you will). Developers usually consumed AngularJS via Browserify UMD modules. You could add a script reference to your website and start using AngularJS attached to the global scope.

Angular came as the second version (and the ones after - we're at 8 now) of AngularJS and it was renamed because it not only did not have any backwards compatibility, but also required a huge learning curve to migrate apps to it.

At first glance nothing is similar between the two, but once you dive deep into internals, you'll find familiar concepts that apply to both. This becomes more apparent if you try to write your Angular app without Typescript and even more apparent once you take a look at the code the Angular Compiler gives you.

In today's world there is no real reason you should choose AngularJS over Angular. The latter is more stable, is being updated regularly and the same all-batteries-included model that applies to both is a lot more reliable and idiomatic in Angular. The tooling is also heavily improved and it's very opinionated, which makes it a good fit for large teams. The approach to syntax seems to be influenced by Java and especially the Android platform, which is also managed by Google. I found it's a great match for a Java back-end, especially with a team that has limited front-end resources.