Full answer
The name causes confusion. "AngularJS" means version 1.x, released in 2010. "Angular" means version 2 and later, a rewrite released in 2016 and updated twice a year since.
Main differences:
- Language: AngularJS used JavaScript (TypeScript was optional and rare). Angular uses TypeScript.
- Architecture: AngularJS used controllers,
$scopeand directives. Angular uses components, services with dependency injection and, in modern versions, standalone components and signals. - Binding and change detection: AngularJS used digest cycles that checked watchers on
$scope, with two-way binding everywhere (ng-model). Angular uses one-way data flow by default, zone.js or signals to detect changes, and explicit[(ngModel)]for two-way binding. - Templates: AngularJS parsed templates in the browser at run time (
ng-repeat,ng-if). Angular compiles templates ahead of time (AOT) into JavaScript, so apps are smaller and faster, and templates are type-checked. - Mobile and performance: Angular was designed for mobile, lazy loading and tree-shaking.
- Tooling: Angular has the CLI, a standard testing setup, and a clear upgrade path with
ng update.
Why no in-place upgrade: the programming model changed (scopes versus components, digest versus new change detection, different DI and routing). Migration therefore needs a plan: run both together with ngUpgrade (the @angular/upgrade package) and move one component or service at a time, or rewrite by feature. Today the usual advice is to migrate directly to the current Angular, since AngularJS support ended on 31 December 2021, and it no longer receives fixes from the Angular team.
In interviews, say "Angular" for 2+ and "AngularJS" for 1.x, and mention that all current jobs mean the modern framework.
import { Component, signal } from '@angular/core';
// AngularJS (1.x): <input ng-model="name"> {{ name }} with controller($scope) { $scope.name = '' }
// Angular (modern): a typed component with a signal and one-way flow by default.
@Component({
selector: 'app-greeting',
template: `
<input [value]="name()" (input)="name.set($any($event.target).value)" />
<p>Hello {{ name() }}</p>
`,
})
export class GreetingComponent {
readonly name = signal('');
}Conceptual answer. The comparison snippet is the Angular 20 side only, type-checked. The AngularJS side is in comments.
Key points
- AngularJS is 1.x (JavaScript, scopes, digest). Angular is 2 and above (TypeScript, components, AOT).
- Angular uses one-way flow by default and compiles templates ahead of time.
- AngularJS support ended on 31 December 2021.
- Migration is gradual with `ngUpgrade` or a feature-by-feature rewrite.
Common mistakes
- Using the two names as if they mean the same thing.
- Planning an "upgrade" instead of a migration.
- Staying on AngularJS without security support.
Follow-ups
- How does `ngUpgrade` let both run together?
- What replaced `$scope` in Angular?
- What would be the first step in migrating a large AngularJS app?
Tips
- Clarify the naming at the start.
- Give three concrete differences (language, change detection, templates).
- State the end of life date (end of 2021).
Evaluation rubric
- Distinguishes the two correctly.
- Names key technical differences.
- Understands migration approach.