AngularJS vs Angular: Basics and How to Get Started with Angular 22
AngularJS basics (modules, controllers, $scope, directives, two-way binding) with a working example, why AngularJS ended on 31 Dec 2021, how it differs from modern Angular, and a tested step-by-step start with Angular 22: Node version, CLI, your first component with signals, @if and @for.

In short
- AngularJS (versions 1.x, first released 20 October 2010) is the original JavaScript framework from Google. Its long-term support ended on 31 December 2021, and its final version, 1.8.3, came out on 7 April 2022. Don't start new projects in it.
- Angular (version 2 onward, first released 14 September 2016) is a complete TypeScript rewrite by the same team. As of 16 November 2026 the current major is Angular 22, released 3 June 2026, in active support until June 2027 and long-term support until June 2028 (angular.dev).
- From v22 Angular moved to one major release every 12 months. Its CLI needs Node.js 22.22.3 or newer: in our test, Node 23 failed the CLI's engine check, while Node 24 worked.
- Both code examples below were run by Skill-Lync on 16 Nov 2026: the AngularJS one on 1.8.3, the Angular one on 22.2.6 (built with
ng buildand clicked through in a browser).
AngularJS basics are modules, controllers, $scope, directives such as ng-model and ng-repeat, and two-way data binding. But AngularJS reached end of life on 31 December 2021. If you are starting today, learn modern Angular (version 22 as of November 2026). It is built on TypeScript components, templates with @if and @for, signals for state, and dependency injection. Learn AngularJS only to maintain or migrate an old app.
This guide does both jobs. It explains AngularJS basics with a small working example, so you can read legacy code. It then compares AngularJS with Angular and walks you through getting started with Angular 22: installing the CLI, creating a project, and building the same app the modern way. Every command and code sample was tested by Skill-Lync on 16 November 2026, and the version and support dates come from the official Angular release page.
What is AngularJS?
AngularJS is an open-source JavaScript framework for building single-page web applications, maintained mainly by Google and first released on 20 October 2010. It extends HTML with "directives" (custom attributes like ng-model), and links the page to JavaScript controllers through a $scope object with two-way data binding. It is version 1.x of the Angular family and is no longer supported.
Its big idea was that the page updates itself when the data changes, and the data updates when the user types, without hand-written DOM code. AngularJS did this with a "digest cycle". After every event, it re-checked all the values the page was watching (dirty checking) and updated whatever had changed. That was simple to start with, but the work grows with every value a page watches.
What are the basics of AngularJS? A working example
An AngularJS app has a module (angular.module), one or more controllers that hold data and functions, and an HTML view that uses directives and { expressions to show that data. ng-app starts the app, ng-controller attaches a controller, ng-model binds an input, ng-click handles clicks, and ng-repeat loops over a list.
Here is a complete AngularJS 1.8.3 task list in one HTML file. We ran it in a browser: typing a task and pressing Add grows the list and updates the count, and the input clears itself.
<!doctype html>
<html ng-app="taskApp">
<head>
<script src="angular.min.js"></script> <!-- AngularJS 1.8.3 -->
</head>
<body ng-controller="TaskController as vm">
<h1>{{ vm.title }}</h1>
<input ng-model="vm.newTask" placeholder="Add a task">
<button ng-click="vm.add()">Add</button>
<ul><li ng-repeat="t in vm.tasks">{{ t }}</li></ul>
<p>{{ vm.tasks.length }} tasks</p>
<script>
angular.module('taskApp', [])
.controller('TaskController', function () {
var vm = this;
vm.title = 'My tasks';
vm.tasks = ['Read the beam deflection notes'];
vm.newTask = '';
vm.add = function () {
if (vm.newTask) { vm.tasks.push(vm.newTask); vm.newTask = ''; }
};
});
</script>
</body>
</html>
Four AngularJS ideas appear in those 25 lines:
- Module:
angular.module('taskApp', [])creates the app. The empty array lists the other modules it depends on. - Controller:
TaskControllerholds the state (title,tasks) and behaviour (add). The "controller as" syntax (vm) keeps the data on the controller instead of writing to$scopedirectly. - Directives:
ng-app,ng-controller,ng-model,ng-clickandng-repeatare attributes that AngularJS reads and turns into behaviour. - Two-way binding:
ng-model="vm.newTask"keeps the input and the variable in sync in both directions. That is why settingvm.newTask = ''clears the box.
One practical note from testing: the old CDN path code.angularjs.org/1.8.3/angular.min.js returned 404 when we tried it on 16 November 2026. Legacy apps should serve their own copy, for example from the [email protected] npm package.
Is AngularJS still supported in 2026?
No. Google's long-term support for AngularJS ended on 31 December 2021, after a six-month extension from the original July 2021 date. The last release, 1.8.3, came out on 7 April 2022. AngularJS no longer receives security fixes or browser-compatibility updates from Google; only paid third-party support exists. New projects should use Angular.
If you maintain an AngularJS app, the realistic options are to keep it isolated and pay for extended support, or to migrate it to Angular (or another framework) piece by piece. Either way, knowing AngularJS basics is useful for reading the old code. It is not a skill to build a career on by itself.
What is the difference between AngularJS and Angular?
AngularJS (1.x) is a JavaScript framework built on controllers, $scope and a digest cycle that dirty-checks for changes. Angular (2 and later) is a ground-up TypeScript rewrite built on components, with templates, dependency injection, a CLI, and signals that update only what changed. They share a name and ideas, but code does not carry over directly.
| AngularJS (1.x) | Angular (2+, now v22) | |
|---|---|---|
| Language | JavaScript | TypeScript |
| Building block | Controller + $scope + HTML view | Component: a TypeScript class with a template |
| Change detection | Digest cycle, dirty-checking watchers | Signals; zoneless by default since v21 |
| Template syntax | ng-repeat, ng-if, ng-click | @for, @if, (click), [property] |
| Tooling | Script tag; any build setup | Angular CLI: ng new, ng serve, ng build |
| First release | 20 Oct 2010 | 14 Sep 2016 (2.0); 22.0 on 3 Jun 2026 |
| Support | Ended 31 Dec 2021 | v22 active to Jun 2027, LTS to Jun 2028 |
How do you get started with Angular in 2026?
Install Node.js 22.22.3 or newer (an even-numbered LTS line such as 24 is safest), then install the CLI with npm install -g @angular/cli. Create a project with ng new my-app, move into the folder, and run npm start or ng serve. The app opens at http://localhost:4200/ and reloads as you edit.
node --version # needs 22.22.3+ (we tested with 24.22.3)
npm install -g @angular/cli
ng new my-app # answer the prompts (stylesheet, SSR)
cd my-app
npm start # serves http://localhost:4200/
What you get in Angular 22 is lean. The root component lives in src/app/app.ts as a class called App. The older app.component.ts naming is gone. Components are standalone by default (no NgModule needed), and the generated config has no zone.js, because zoneless change detection became the default in Angular 21. Our test project used @angular/core 22.2 with TypeScript 6.0.
One trap we hit: the CLI refused to install packages under Node 23. Odd-numbered Node.js versions are not LTS, and Angular 22's CLI requires Node ^22.22.3 || ^24.15.0 || >=26. If ng new fails during "Installing packages", check node --version first.
How do you write your first Angular component?
An Angular component is a TypeScript class decorated with @Component, which gives it a selector (its HTML tag) and a template. State lives in signals. You create one with signal(), read it by calling it (tasks()), and change it with set() or update(). A computed() value recalculates only when the signals it reads change.
Here is the same task list rebuilt in Angular 22. We compiled it with ng build (about 55 kB estimated transfer for the whole app) and tested it in a browser on Angular 22.2.6. Adding a task updates the list and the count, the input clears, and an empty input is ignored.
// src/app/task-list.ts
import { Component, computed, signal } from '@angular/core';
@Component({
selector: 'app-task-list',
template: `
<h2>{{ title() }}</h2>
<input #box placeholder="Add a task" />
<button (click)="add(box.value); box.value = ''">Add</button>
@if (tasks().length === 0) {
<p>No tasks yet.</p>
} @else {
<ul>
@for (task of tasks(); track $index) {
<li>{{ task }}</li>
}
</ul>
}
<p>{{ count() }} tasks</p>
`,
})
export class TaskList {
protected readonly title = signal('My tasks');
protected readonly tasks = signal<string[]>(['Read the beam deflection notes']);
protected readonly count = computed(() => this.tasks().length);
add(task: string) {
const t = task.trim();
if (t) {
this.tasks.update((list) => [...list, t]);
}
}
}
// src/app/app.ts
import { Component } from '@angular/core';
import { TaskList } from './task-list';
@Component({
selector: 'app-root',
imports: [TaskList],
template: `<app-task-list />`,
})
export class App {}
Line by line, against the AngularJS version:
- The controller becomes a component class.
TaskListholds the state, andselector: 'app-task-list'makes it usable as<app-task-list />. The parent lists it inimports, with no module file needed. $scopevariables become signals.tasksis a signal, so Angular knows exactly which parts of the page read it.countis acomputed()that updates itself.- Directives become built-in control flow and bindings.
ng-repeatbecomes@for (...; track task),ng-ifbecomes@if/@else, andng-clickbecomes(click). Thetrackexpression tells Angular how to tell items apart when the list changes. Here$indextracks by position, which also allows duplicate tasks. When items have a unique id, track that instead. - Immutability.
update((list) => [...list, t])creates a new array instead of pushing into the old one, which is the pattern signals expect.
What else should you learn after the basics?
After components and signals, learn the pieces every real Angular app uses. Routing (provideRouter, already in the generated app.config.ts) moves between pages. Services with dependency injection (inject()) share data and logic. Forms handle user input; Angular 22 made Signal Forms stable. HttpClient calls a back end, and the testing tools check it all.
A sensible order for a fresher:
- TypeScript basics: types, classes, interfaces, generics.
- Components, templates, bindings and control flow.
- Signals,
computed()and inputs and outputs between components. - Services and dependency injection.
- Routing and lazy-loaded pages.
- Forms and validation.
- Calling REST APIs with
HttpClient. - Building, testing and deploying.
Pair it with a back end (Node.js or Java) and a database, and you can build complete full-stack projects.
Skill-Lync's Angular web development course builds real-world apps step by step, and the Master's in Full Stack Web Development adds the back end and deployment. For the bigger picture of front-end, back-end and full-stack roles, read front end, back end and full stack explained. Not sure where to start? Talk to a Skill-Lync counsellor.
Frequently asked questions
Is AngularJS the same as Angular?
No. AngularJS is version 1.x, a JavaScript framework from 2010 built on controllers, $scope and a digest cycle; its support ended on 31 December 2021. Angular is version 2 and later, a complete TypeScript rewrite from 2016 built on components and, today, signals. They share a team and a name, but not code.
Should I learn AngularJS or Angular in 2026?
Learn Angular. AngularJS has had no official support since 31 December 2021, so new projects don't use it. Learn its basics only if you must maintain or migrate an old app. Angular 22, released on 3 June 2026, is in active support until June 2027 and long-term support until June 2028.
Is AngularJS dead?
AngularJS is end-of-life rather than gone. Google stopped long-term support on 31 December 2021, and the final release, 1.8.3, came out on 7 April 2022. Existing apps still run, and paid third-party support exists. But it receives no official security fixes, so it is a maintenance and migration skill, not a new-project choice.
What Node.js version does Angular 22 need?
Angular's installation guide asks for Node.js 22.22.3 or newer. The Angular 22 CLI package declares support for Node ^22.22.3, ^24.15.0 or 26 and later. Odd-numbered versions like Node 23 are not LTS and failed the CLI's engine check in our test. Node 24 worked without problems.
How often does Angular release a new version?
Until version 22, Angular shipped a major version every six months. From Angular 22 it moved to one major release every 12 months, with four to six minor releases in between. Each major is supported for about 24 months: 12 months of active support, then 12 months of long-term support with critical and security fixes.
Is Angular good for freshers in India?
Angular is a good first framework if you like structure. TypeScript, a CLI, routing, forms and testing come built in, and each major version is supported for about two years. Learn it alongside TypeScript, a back end and Git, and build two or three complete projects. What you can show you have built matters more than the framework name.
Sources and further reading
- Angular, Angular versioning and releases (12-month major cycle from v22; v22 released 2026-06-03, active to 2027-06, LTS to 2028-06; v21 and v20 dates; accessed 16 Nov 2026)
- Angular, Installation (Node.js 22.22.3 or newer;
npm install -g @angular/cli,ng new,npm start, localhost:4200; accessed 16 Nov 2026) - Angular, Signals guide (
signal(),set(),update(),computed(); accessed 16 Nov 2026) - SD Times, AngularJS long-term support is officially discontinued (LTS moved from July 2021 to 31 Dec 2021; accessed 16 Nov 2026)
- endoflife.date, AngularJS (deprecated 31 Dec 2021; final 1.8.3 released 7 Apr 2022; accessed 16 Nov 2026)
- Wikipedia, AngularJS and Angular (web framework) (release dates; rewrite; zoneless default in v21; Signal Forms stable in v22; accessed 16 Nov 2026)
- npm registry, @angular/cli latest release metadata (we tested 22.2.6; 22.2.7 was published later on 16 Nov 2026; engines: Node ^22.22.3 || ^24.15.0 || >=26.0.0; checked 16 Nov 2026)