Angular and Its History
You search for an Angular answer and find two tutorials that look nothing alike. One is full of $scope and ng-controller; the other uses classes, decorators and signal(). Both say "Angular". Knowing the history lets you tell in five seconds which one is useful to you.
The rule
AngularJS is the old framework; Angular is its rewrite, not its upgrade.
AngularJS appeared in 2010 at Google. It was plain JavaScript, and it made HTML "smarter" with attributes like ng-model and ng-repeat. It became hugely popular, but large apps grew slow and hard to organise.
So the team started over. Angular (released in 2016 as "Angular 2") was written in TypeScript and built around components: small classes that each own a piece of the page. The name dropped the "JS" to mark the break. The two cannot be mixed in one file, and moving an app from one to the other means rewriting it. AngularJS reached the end of official support at the end of 2021.
Since then Angular ships a new major version about every six months, and recent versions changed how everyday code looks:
- Standalone components replaced the need for
NgModulewrappers. - Signals give a simple, fine-grained way to hold changing values.
- Built-in control flow (
@if,@for,@switch) replaced the older*ngIfand*ngForstyle for new code.
Here is the component this course keeps building, Greenhouse, an app that tracks house plants and when to water them:
import { Component, signal } from '@angular/core';
@Component({
selector: 'app-root',
template: `<h1>{{ title() }}</h1>`,
})
export class App {
title = signal('Greenhouse');
}The shortcut
Scan the code for one fingerprint. $scope, ng- attributes, or angular.module(...) mean AngularJS. @Component, TypeScript classes, signal() or @if mean modern Angular. Within modern Angular, standalone components and @if blocks mark current style, while NgModule and *ngIf mark older (still working) style.
Look for $scope or ng-controller
Found
$scope.plants = []? That is AngularJS. Put the tutorial aside.
The common trap is treating "Angular 1" and "Angular 17" as neighbours on one line. They are different frameworks that share a name and a company.
Drills
Answer fast — trust the rule.
A code sample uses $scope.plants. Which framework is it written for?
How did Angular (version 2) relate to AngularJS?
Roughly how often does Angular release a new major version?
Which of these marks the most current style of Angular template?
Remember
- AngularJS (2010, JavaScript) and Angular (2016 on, TypeScript, components) are different frameworks.
- Shortcut:
$scopeorng-means AngularJS;@Componentandsignal()mean Angular. - Trap: older Angular samples (
NgModule,*ngIf) still work but are no longer how new code is written.
