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?

7
  • 1
    "Are they completely different?" ...Yes. Try first, then ask specific problem questions Commented Sep 23, 2017 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. Commented Sep 23, 2017 at 22:20
  • Do you have experience with any other js frameworks like vue or react? They are actualy libraries. Commented Sep 23, 2017 at 22:21
  • 1
    AngularJs is very easy to learn if you are good at Html,Css,Javascript. Commented Sep 23, 2017 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! Commented Sep 24, 2017 at 5:59

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @estus that was extremely helpful and confirmed a lot of things I have heard so far.
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.