5

Let me start with the justification. A lot of companies that have now been using AngularJS for years are still using it, and don't have immediate plans to migrate to 4+. So there's marketability, plus the inevitable requirement of knowing both as an Angular developer.

My question is broad I know, but I am curious to hear from folks who have experience with both. Are they completely different, or will some of the knowledge transfer? For those who know both really well, what are the key differences that really stick out to you?

joshrathke
  • 7,564
  • 7
  • 23
  • 38
  • 1
    *"Are they completely different?"* ...Yes. Try first, then ask specific problem questions – charlietfl Sep 23 '17 at 22:19
  • That actually helps a lot :) I guess more than anything I am trying to get a grasp on my expectations before diving in. – joshrathke Sep 23 '17 at 22:20
  • Do you have experience with any other js frameworks like vue or react? They are actualy libraries. – Mihailo Sep 23 '17 at 22:21
  • 1
    AngularJs is very easy to learn if you are good at Html,Css,Javascript. – Hareesh Sep 23 '17 at 22:23
  • they are totally different from each other, actually they are two separate products. so you have to behave as two different frameworks. but if you worked with angular 2+ , now you are familiar with SPA and MVC programming and you are able to realize the requirement of AngularJs easier than ever! – MohammadJavad Seyyedi Sep 24 '17 at 05:59
  • I'd suggest to rephrase the question to make it less opinion-based, so it would be less opinion-based (still may be broad but have a finite amount of possible proper answers). – Estus Flask Sep 24 '17 at 07:16
  • *So there's marketability, plus the inevitable requirement of knowing both as an Angular developer.* Yes, there's marketability, but there's also marketability for carrying loads of bricks at construction sites. And no, I don't think the requirement of knowing both is "inevitable". –  Sep 24 '17 at 08:01

1 Answers1

5

In comparison to Angular (2 and higher), AngularJS has several important limitations that affect the way applications can be built.

  • A single injector with string DI tokens and no built-in lazy loading.

  • Config/run phases and synchronous bootstrapping (the overview of configuration recipes).

  • Scope hierarchy for data binding and its consequences for application architecture - the concept of digests, performance impact, AngularJS-specific services ($timeout, $q, ...) instead of native counterparts, etc.

  • jQuery-influenced approaches for manual DOM manipulation.

  • Considerably different set and API of built-in services, directives and filters (pipes).

  • No support for nested applications (possible with a hack).

  • No view encapsulation and component styles.

  • No built-in component router.

  • No built-in translation/i18n.

  • No built-in support for workers and server side rendering.

  • No official CLI.

The development of AngularJS has been focused on providing upgrade strategies and common features since 1.5. In a lot of aspects Angular/TypeScript experience can serve as a source for best practices for modern AngularJS development.

AngularJS is generally more flexible in the ways how its injector and compiler work and allows for a plethora of neat hacks that have been rendered impractical or impossible in Angular.

There's a lot of smaller differences that AngularJS introduces which may be discarded if the goal is to intentionally limit development practices to the ones that allow to build TypeScript/ES6/ES.next AngularJS application that follows Angular guidelines and could be easily upgraded to Angular in future.

ng-metadata does its best to unify AngularJS coding practices with Angular but still requires a good understanding of the differences between two frameworks.

However, smaller differences make a big difference if a developer works on existing AngularJS project that heavily relies on them and uses legacy coding standards.

Estus Flask
  • 206,104
  • 70
  • 425
  • 565
  • Thanks @estus that was extremely helpful and confirmed a lot of things I have heard so far. – joshrathke Sep 24 '17 at 14:02
  • 1
    You're welcome. I believe it's possible to reach intermediate level in 'modern' A1 very quickly after A4, but if you will be involved in existing project that wasn't coded as 'modern', as you assume in the question (e.g. version 1.2 to 1.4, with vanilla ES5, and $scope, and jQuery everywhere), it may feel like totally different framework (which it actually is). – Estus Flask Sep 24 '17 at 14:10