The below table demonstrated the difference between AngularJS and Angular.
AngularJS (1.x) |
Angular 2+ |
AngularJS is name of the first version of Angular 1.0 . |
Angular is complete re-write of AngularJS and it is the name of Angular version 2 and above. |
AngularJS is based on JavaScript, which is prototype-based OOP language. |
Angular is based on TypeScript, which is class-based OOP language. |
AngularJS code is written in JavaScript. |
Angular code is written in TypeScript. |
AngularJS architecture is based on Model View Controller (MVC). |
Angular architecture is entirely component based. It uses components and directives. Component are directives with a template. |
AngularJS is based on MVC architecture. The code will be divided into three major parts called “Model”, “View” and “Controller”. Model is an object that stores data. View is a html file that contains presentation logic to display data. Controller is a function that manipulates data. |
Angular is based on Components. Component is a class that contains stores data and also manipulates the data. View is a html file that contains presentation logic to display data |
AngularJS required ng-directive for property and event binding. |
Angular uses () for event binding and [] for property binding. |
It doesn’t support by mobile browsers or in other words it is not mobile friendly. |
It supported by all the mobile browsers or in other words it is mobile friendly. |
In AngularJS for routing configuration $routeprovide.when() is used. |
In Angular for routing configuration @RouteConfige{(…)} is used. |
It is less manageable and stable compared to Angular. |
It is more flexible and stable compared to AngularJS. |
It does not use Dependency injection it has issue with it. |
It comes with a built-in dependency injection for better performance and provide loosely couple. |
It uses ng-bind to bind the data between view and model (two-way binding). {{ }} expressions can also be used to do the same. |
It uses () and [] attributes to bind the data between view and model (two-way binding). |
It uses the concept of $scope and controller. |
It uses the hierarchy of components in place of $scope and controller. |
It doesn’t support dynamic loading of the page. |
It supports dynamic loading of the page. |
To initialize ng-app and angular.bootstrap() function are used. |
To initialize bootstrapModule() function is used. |
It supports filters for transforming data to responsive display. |
It supports pipe for transforming data to responsive display. |
It does not support Angular CLI. |
It supports Angular CLI. |
It is not flexible and can run on only client-side. |
It is flexible and can run on client-side and server-side. |
In AngularJS to define services factory, service, provider, value and constant are used. |
In Angular to define services class is the only way to do it. |
AngularJS Supports spinal-case and camelCase syntaxes like ng-model, ng-class and ngModel. |
Angular Supports camelCase and PascalCase syntaxes like ngModel, ngForm and NgForm. |
Doesn’t provide CLI (Command Line Interface), to generate components and services easily from the command prompt commands. |
Provides CLI (Command Line Interface), to generate components and services easily from the command prompt commands |