What are the differences between AngularJS (angular 1.x) and Angular (Angular 2.x and beyond)?

Technology CommunityCategory: AngularWhat are the differences between AngularJS (angular 1.x) and Angular (Angular 2.x and beyond)?
VietMX Staff asked 3 years ago

Angular and AngularJS is basically a different framework with the same name.

Angular is more ready for the current state of web standards and the future state of the web (ES6\7, immutiablity, components, shadow DOM, service workers, mobile compatibilty, modules, typescript and so on and so on… )

Angular killed many main features in AngularJS like – controllers, $scope, directives (replaced with @component annotations), the module definition, and much more, even simple things like ng-repeat has not left the same as it was.

Also: 1. They added an angular cli. 2. Your angular code is written in ES6 Typescript and it compiles at runtime to Javascript in the browser. 3. You bind to your HTML similarly like how you would if in an Angular 1 directive. So variable like $scope and $rootScope have been deprecated.