Monday, August 18, 2025

Angular 14 vs Angular 20

 

Angular 14 vs Angular 20 

Comparison Table

FeatureAngular 14 (Old)Angular 20 (New)Example
Strictly Typed FormsIntroduced typed forms (FormControl<string>)Matured and fully stablets\nconst name = new FormControl<string>('');
Standalone ComponentsIntroduced (experimental)Default way to build apps (no need NgModule)ts\n@Component({ standalone: true })\nexport class HomeComponent {}\n
NgModulesStill mandatory for most appsOptional (can mix with standalone)Old: @NgModule({ declarations: [...] }) New: bootstrapApplication(AppComponent)
Signals❌ Not available✅ Core feature (reactivity model replacing heavy RxJS usage in components)ts\nconst count = signal(0);\ncount.set(count() + 1);\n
Zoneless Change Detection❌ Only Zone.js✅ Zone.js optional (can run Angular without it, using signals + manual triggers)ts\nbootstrapApplication(App, { providers: [provideZoneChangeDetection({ eventCoalescing: true })] })
SSR & HydrationLimited, experimentalFirst-class: @angular/ssr with full hydration supportbash\nng add @angular/ssr
Build ToolingWebpack onlyESBuild + Vite support → faster builds & dev serverbash\nng serve --configuration vite
RxJSVersion 7Version 8 (with smaller, functional APIs)Old: of(1).pipe(map(x => x+1)) New: map(of(1), x => x+1)
Router EnhancementsBasic lazy loadingDeferrable views (@defer) for lazy-loading parts of templateshtml\n@defer (on viewport)\n <chat-widget />\n@placeholder Loading... @end
CLIStandard commandsSmarter: auto-converts to standalone, better defaults, fasterbash\nng generate component home --standalone
MaterialAngular Material v14 (legacy APIs)Material 3 (MDC-based, theming, typography, dynamic colors)html\n<mat-button color="tertiary">New Color</mat-button>
Dependency InjectionTraditionalInjection contexts, inject() API everywhere (not only in constructors)ts\nconst router = inject(Router);\n

In short:

  • Angular 14 = still module-heavy, no signals, slower builds.

  • Angular 20 = standalone-first, signals (new reactivity), zoneless change detection, Vite/ESBuild, better SSR, Material 3.

LeetCode C++ Cheat Sheet June

🎯 Core Patterns & Representative Questions 1. Arrays & Hashing Two Sum – hash map → O(n) Contains Duplicate , Product of A...