Angular (SSR)
Angular (SSR) scores 18 of 28 points. That is 9 of 14 on the 7 features that affect first paint (the moment the browser first draws content), and 9 of 14 on the 7 other features.
- Version checked
- @angular/ssr 22.2.6 and @angular/core 22.2.5 (npm latest when checked; latest is now 22.3.0 for both and angular.dev is built at v22.3.0)
- Version notes
- The angular-books port locks @angular/ssr 22.2.7 and @angular/core 22.2.6.
- Performance guide
- Performance • Overview • Angular
- Issues
- github.com/angular/angular/issues
Scorecard
All 14 features, in two groups. Each row shows Angular (SSR)'s label, how that label compares across all 23 frameworks, and how to enable the feature. Feature names link to Angular (SSR)'s entry on that feature's page.
Angular (SSR)'s labels across 14 features
- 1st-party8
- Experimental0
- Third-party2
- Manual4
- of 14
How it compares
On 8 of 14 features, no framework has a higher-scoring label than Angular (SSR). On the other 6, at least one does.
Tested in our port
The angular-books port passes 10/11 feature tests (failed: Font optimization). Run on 2026-11-27 at MaxwellCohen/angular-books@4beef3e. How we test labels
First-paint levers
- 01Production CSS inlining1st-party2 pts
1st-party, like 7 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
optimization.styles.inlineCriticaldefaults totrue; critical CSS is inlined and the rest loads async. On in the defaultproductionconfig. (workspace-config, build)Code example
Critical CSS inlining is part of the production
optimizationsetting. Angular inlines the CSS the first page needs and loads the rest of the stylesheet async.// angular.json { "projects": { "books": { "architect": { "build": { "builder": "@angular/build:application", "configurations": { "production": { "optimization": { "scripts": true, "styles": { "minify": true, "inlineCritical": true }, "fonts": true } } } } } } } }Source: Angular: Workspace configuration
- 02Font optimizationThird-party1 pt
Third-party, like 18 of the other 22 frameworks. 4 frameworks score higher.
Tested in our port: failedShow the how-to and testHide the how-to and test
optimization.fonts.inline(defaulttrue) inlines external Google Fonts and Adobe Fonts CSS into the index HTML (needs internet at build). That removes one render-blocking stylesheet request, but the font files still load from the font host; no self-hosting, subsetting, or preload is documented. Self-hosting needs a package such as Fontsource, as for React Router, Qwik City, Marko, and Fresh. Our feature test confirmed this: withfonts.inlineon, the Google CSS was inlined and the font file was still fetched fromfonts.gstatic.com. (workspace-config, Fontsource)Code example
Link a Google Fonts stylesheet in
index.htmlas usual. Withoptimization.fonts.inlineon, the production build downloads that CSS and inlines it into the HTML, removing one render-blocking request.<!-- src/index.html --> <head> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet" /> </head>// angular.json (production configuration; needs internet access at build time) "optimization": { "fonts": { "inline": true } }Source: Angular: Workspace configuration
- 03Image pipeline1st-party2 pts
1st-party, like 8 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
NgOptimizedImage:priority(fetchpriority=high, eager, SSR preload link), autosrcset,placeholderblur, lazy by default. Built-in loaders for Cloudflare Image Resizing, Cloudinary, ImageKit, Imgix, Netlify; it does not resize itself (the default loader is a no-op). (image-optimization)Code example
NgOptimizedImagewith a built-in loader. The loader builds CDN URLs for eachngSrcsetwidth;prioritymarks the LCP image andplaceholdershows a low-res blur from the same CDN.// src/app/app.config.ts import { provideImgixLoader } from '@angular/common'; export const appConfig: ApplicationConfig = { providers: [provideImgixLoader('https://books.imgix.net/')], }; // src/app/book/book-cover.ts import { NgOptimizedImage } from '@angular/common'; @Component({ selector: 'app-book-cover', imports: [NgOptimizedImage], template: ` <img [ngSrc]="src()" width="400" height="600" [alt]="title()" ngSrcset="200w, 400w, 800w" sizes="(max-width: 640px) 50vw, 200px" [priority]="priority()" placeholder /> `, }) export class BookCover { /* … */ }Art direction with <picture>
ManualServing a different crop or format per screen size. Not scored: the label shows how much the framework does for you.
The
NgOptimizedImagepage says<picture>is not supported yet ("on our roadmap"); no art direction or<source type>format fallback is documented. Format is left to the configured image-CDN loader (the page says only that the loader sets "size, format, and image quality transformations"). No first-party<picture>documented; hand-write it. (image-optimization)Example
NgOptimizedImage can't render
<picture>, so write the element in a component template with plain<source>tags for format fallback and art direction.// src/app/home/hero-image.ts import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ selector: 'app-hero-image', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <picture> <!-- art direction: a square crop on narrow screens --> <source media="(max-width: 640px)" type="image/avif" srcset="/media/hero-square-640.avif" width="640" height="640" /> <!-- format fallback: AVIF, then WebP, then the <img> JPEG --> <source type="image/avif" sizes="100vw" srcset="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" /> <source type="image/webp" sizes="100vw" srcset="/media/hero-1280.webp 1280w, /media/hero-1920.webp 1920w" /> <img src="/media/hero-1280.jpg" alt="Shelves of books" width="1280" height="720" fetchpriority="high" decoding="async" /> </picture> `, }) export class HeroImage {}Source: Angular image optimization FAQ
- 04Data/HTML caching1st-party2 pts
1st-party, like 16 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
RenderMode.Prerenderbuild-time HTML; theHttpClienttransfer cache (withHttpTransferCacheOptions) reuses SSR responses on hydration; per-routeheaders. No ISR/revalidate or server data cache documented. (ssr, withHttpTransferCacheOptions)Code example
Prerender stable pages at build time, and let the HttpClient transfer cache hand SSR responses to the browser so hydration does not fetch them again.
// src/app/app.routes.server.ts export const serverRoutes: ServerRoute[] = [ { path: 'about', renderMode: RenderMode.Prerender }, { path: '**', renderMode: RenderMode.Server, headers: { 'Cache-Control': 'public, max-age=60' } }, ]; // src/app/app.config.ts import { provideClientHydration, withHttpTransferCacheOptions } from '@angular/platform-browser'; providers: [ provideClientHydration( withHttpTransferCacheOptions({ includeHeaders: ['ETag', 'Cache-Control'], filter: (req) => !req.url.includes('/api/profile'), includePostRequests: false, }), ), ], - 05Route prefetching1st-party2 pts
1st-party, like 18 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Opt-in
withPreloading(PreloadAllModules)preloads lazy route chunks;@deferhasprefetch on idle/viewport/hover. No link hover/viewport prefetch documented. The default strategy isNoPreloading, so nothing is preloaded untilwithPreloading(...)is added. (NoPreloading, PreloadAllModules, defer)Code example
The router preloads nothing by default (
NoPreloading). AddwithPreloading(PreloadAllModules)to fetch every lazy route chunk after the app starts.@deferblocks take their ownprefetchtrigger.// src/app/app.config.ts import { ApplicationConfig } from '@angular/core'; import { provideRouter, withPreloading, PreloadAllModules } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [provideRouter(routes, withPreloading(PreloadAllModules))], };<!-- any template: load the chunk on interaction, prefetch it when the browser is idle --> @defer (on interaction; prefetch on idle) { <app-book-reviews /> } @placeholder { <button>Show reviews</button> } - 06Streaming SSRManual0 pts
Manual, like 2 of the other 22 frameworks. 20 frameworks score higher.
Show the how-toHide the how-to
No streaming render documented. The SSR guide describes rendering the page to a complete HTML document and then sending it, and the word "stream" does not appear in it. (ssr)
Code example
Angular renders the whole document before sending it. To get bytes out sooner, flush a fixed
<head>from the Express handler while Angular renders, then send the rest of Angular's HTML. The status code and head are fixed before rendering starts.// src/server.ts import { AngularNodeAppEngine } from '@angular/ssr/node'; import express from 'express'; const app = express(); const angularApp = new AngularNodeAppEngine(); // Copy the <head> of the built index.server.html, with its hashed CSS link. const HEAD = `<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Books</title> <link rel="stylesheet" href="/styles-HASH.css"></head>`; app.use(async (req, res, next) => { if (!req.accepts('html')) return next(); res.status(200).type('html').write(HEAD); // sent before Angular renders const response = await angularApp.handle(req); const html = response ? await response.text() : '<body></body>'; res.end(html.slice(html.indexOf('</head>') + '</head>'.length)); // body only });Source: Angular: Server-side rendering
- 07Early Hints / preload headersManual0 pts
Manual, like 15 of the other 22 frameworks. 7 frameworks score higher.
Show the how-toHide the how-to
No first-party preload
Linkheaders or 103 Early Hints documented. Per-routeheadersinServerRouteandRESPONSE_INITcan set aLinkheader by hand. (ssr)Code example
Add a
Linkheader to the server route'sheaders. This one preconnects to the font host. To preload a built file with a hashed name, read its URL from the Vite manifest.// src/app/app.routes.server.ts import { RenderMode, ServerRoute } from '@angular/ssr'; export const serverRoutes: ServerRoute[] = [ { path: '**', renderMode: RenderMode.Server, headers: { Link: '<https://fonts.gstatic.com>; rel=preconnect; crossorigin' }, }, ];
Other features
- 08Islands / partial hydration / lazy slices1st-party2 pts
1st-party, like 14 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Incremental hydration via
@deferwithhydrate on idle/viewport/interaction/hover/immediate/timer/whenandhydrate never; the v22 guide says it is enabled by default withprovideClientHydration(). Stable since v20 per the roadmap (developer preview in v19), and on by default since v22.0.0, whenwithIncrementalHydrationwas deprecated (withIncrementalHydration); the v22 guide pages carry no stability label. (incremental-hydration, hydration)Code example
Incremental hydration is on by default with
provideClientHydration(). A@deferblock with ahydratetrigger renders on the server and stays dehydrated until the trigger fires.// src/app/app.config.ts providers: [provideClientHydration()],<!-- src/app/pages/book.page.ts template --> <app-book-detail [book]="book()" /> @defer (hydrate on viewport) { <app-related-books [bookId]="book().id" /> } @defer (on viewport; hydrate never) { <app-static-footer /> }Source: Angular: Incremental hydration
- 09Per-route render modes1st-party2 pts
1st-party, like 18 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
ServerRoute[]inapp.routes.server.tswithRenderMode.Server/Client/Prerender;getPrerenderParams,fallback, per-routeheaders/status;outputMode: "static"for server-less builds. Stable since v20 per the roadmap (developer preview in v19); the guide itself carries no stability label. (ssr)Code example
Each route picks a render mode in
app.routes.server.ts: per-request SSR, build-time prerender, or client-only.// src/app/app.routes.server.ts import { inject } from '@angular/core'; import { RenderMode, PrerenderFallback, ServerRoute } from '@angular/ssr'; export const serverRoutes: ServerRoute[] = [ { path: '', renderMode: RenderMode.Server }, { path: 'about', renderMode: RenderMode.Prerender }, { path: 'account', renderMode: RenderMode.Client }, { path: 'book/:id', renderMode: RenderMode.Prerender, fallback: PrerenderFallback.Server, async getPrerenderParams() { const ids = await inject(BooksApi).topIds(); return ids.map((id) => ({ id })); }, }, { path: '**', renderMode: RenderMode.Server, status: 404 }, ]; - 10Fine-grained client reactivity1st-party2 pts
1st-party, like 21 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Signals (
signal,computed,linkedSignal,effect,resource) track dependencies dynamically; zoneless is default from v21. The page gives no stability label. (signals, zoneless)Code example
From the Books port's cover component:
input()andsignal()hold state,computed()derives from them, and the template re-renders only what reads a changed signal.// src/app/book/book-cover.ts import { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core'; @Component({ selector: 'app-book-cover', changeDetection: ChangeDetectionStrategy.OnPush, template: ` @if (showImage()) { <img [src]="readySrc()" [alt]="title()" (error)="failedSrc.set(readySrc())" /> } @else { <div role="img">Cover unavailable</div> } `, }) export class BookCover { readonly title = input.required<string>(); readonly src = input.required<string | null>(); protected readonly failedSrc = signal<string | null>(null); protected readonly readySrc = computed(() => getLargeBookImageUrl(this.src() ?? EMPTY_IMAGE_URL)); protected readonly showImage = computed(() => this.readySrc() !== this.failedSrc()); }Source: Angular: Signals
- 11Built-in bundle analysisThird-party1 pt
Third-party, like 18 of the other 22 frameworks. 2 frameworks score higher.
Show the how-toHide the how-to
ng build --stats-jsonwrites a stats file for an external esbuild analyzer; default budgets warn 500kb/error 1mb oninitial. The viewer is external. (build, build)Code example
--stats-jsonwritesbrowser-stats.json(andserver-stats.jsonwith SSR). Load it into the esbuild analyzer at esbuild.github.io/analyze. Budgets inangular.jsonfail the build when bundles grow.ng build --stats-json # then open https://esbuild.github.io/analyze/ and load dist/books/browser-stats.json// angular.json, configurations.production "budgets": [ { "type": "initial", "maximumWarning": "500kB", "maximumError": "1MB" }, { "type": "anyComponentStyle", "maximumWarning": "4kB", "maximumError": "8kB" } ]Source: Angular CLI: ng build
- 12Third-party script strategiesManual0 pts
Manual, like 16 of the other 22 frameworks. 6 frameworks score higher.
Show the how-toHide the how-to
No first-party script-loading primitive documented (the runtime-performance page lists none). Rests on absence. (runtime-performance)
Code example
Put the loading strategy in the tag yourself:
asyncinsrc/index.htmlfor early scripts, orafterNextRenderto inject one after the first browser render.// src/index.html: loads in parallel, runs as soon as it arrives // <script async src="https://plausible.io/js/script.js" data-domain="books.example"></script> // src/app/app.ts: load a chat widget only in the browser, after first render import { Component, afterNextRender } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.html' }) export class App { constructor() { afterNextRender(() => { // Never runs during SSR; wait for idle so the widget doesn't compete with hydration. (window.requestIdleCallback ?? setTimeout)(() => { const s = document.createElement('script'); s.src = 'https://widget.example.com/chat.js'; s.async = true; document.body.append(s); }); }); } }Source: afterNextRender
- 13Portable multi-host deploymentManual0 pts
Manual, like 8 of the other 22 frameworks. 14 frameworks score higher.
Show the how-toHide the how-to
Web-standard
AngularAppEngine/createRequestHandleris portable, withAngularNodeAppEnginefor Node andoutputMode: "static". SSR is documented for Node (first-party), Netlify (host-maintained@netlify/angular-runtime, Edge Function) and Cloudflare Workers: the Cloudflare guide scaffolds an SSR Worker throughcreate-cloudflare --framework=angular(AngularAppEngine,ssr.platform: "neutral"), maintained by Cloudflare rather than the Angular team, though the guide page itself does not mention SSR and its automatic-configuration example is assets-only. Vercel lists Angular only as a zero-config frontend framework and no Vercel Angular SSR page was found, so the four hosts this repo targets are not all covered. The deployment page also lists third-partyng deploybuilders. This portability judgment is lower confidence. (ssr, angular, angular, frontend, deployment)Code example
From the port: one
AngularAppEnginehandler per host, each picked by a build configuration inangular.json. Vercel reuses the Node/Express build behind a function.// angular-books/src/server.cloudflare.ts (Netlify's server.netlify.ts is the same shape) import { AngularAppEngine, createRequestHandler } from '@angular/ssr'; // … const angularAppEngine = new AngularAppEngine(); async function handle(request: Request): Promise<Response> { const result = await angularAppEngine.handle(request); return result || new Response('Not found', { status: 404 }); } export const reqHandler = createRequestHandler(handle); export default { fetch: (request: Request) => handle(request) }; // angular-books/angular.json, build.configurations: one SSR entry per host // "node": { "ssr": { "entry": "src/server.ts" } }, // "cloudflare": { "ssr": { "entry": "src/server.cloudflare.ts", "platform": "neutral" } }, // "netlify": {} // default "ssr.entry": "src/server.netlify.ts" // angular-books/api/index.js: Vercel function wrapping the Express build // handler ??= (await import('../dist/angular-books/server/server.mjs')).reqHandler;Source: Angular SSR
- 14Service worker / offline support1st-party2 pts
1st-party, like 1 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
ng add @angular/pwaadds@angular/service-worker, registers it, and createsngsw-config.json; the build writes the hashed asset manifest, and the worker caches the app shell and configured data groups. (getting-started, service-workers)Code example
ng add @angular/pwaadds@angular/service-worker, registers it in the app config and createsngsw-config.json. The build writes the asset manifest the worker uses.// src/app/app.config.ts import { ApplicationConfig, isDevMode } from '@angular/core'; import { provideServiceWorker } from '@angular/service-worker'; export const appConfig: ApplicationConfig = { providers: [ provideServiceWorker('ngsw-worker.js', { enabled: !isDevMode(), registrationStrategy: 'registerWhenStable:30000', }), ], };// ngsw-config.json { "index": "/index.html", "assetGroups": [ { "name": "app", "installMode": "prefetch", "resources": { "files": ["/favicon.ico", "/index.html", "/*.css", "/*.js"] } } ], "dataGroups": [ { "name": "api", "urls": ["/api/**"], "cacheConfig": { "strategy": "performance", "maxSize": 100, "maxAge": "1d" } } ] }Source: Angular: Getting started with service workers, Angular: Service worker configuration
1st-party scores 2 points, Experimental and Third-party 1, Manual 0. How scoring works
The port
The books demo app built with this framework, and where each branch is deployed.
- App
- angular-books
- Repository
- github.com/MaxwellCohen/angular-books
Branch
main
vibe port
- Cloudflare
- angular-books.to-email-max.workers.dev
Branch
optimized
cache + fonts
Latest benchmark
Mobile Lighthouse lab results from PageSpeed Insights on : the median of 3 runs per host, averaged across the hosts listed. The benchmark page explains each metric and has every other framework.
| Build | Path | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Hosts |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Book list / | |||||||||||
| baseline | / | 89 | (good)0.78 | 0.36 | (needs improvement)3.76 | (good)28 | (good)0.000 | 1.15 | 3.76 | 270 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | / | 87 | (good)0.80 | 1.44 | (needs improvement)3.91 | (good)35 | (good)0.000 | 2.50 | 3.91 | 274 | 3/3 Vercel, Netlify, Cloudflare |
| Book page /10145787 | |||||||||||
| baseline | /10145787 | 99 | (good)0.78 | 0.23 | (good)2.06 | (good)3 | (good)0.000 | 1.08 | 2.19 | 176 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | /10145787 | 99 | (good)0.78 | 1.13 | (good)2.22 | (good)26 | (good)0.000 | 2.25 | 2.33 | 218 | 3/3 Vercel, Netlify, Cloudflare |
- Good
- Needs improvement
- Poor
FCP 1.8 s / 3 s · LCP 2.5 s / 4 s · TBT 200 ms / 600 ms · CLS 0.1 / 0.25
Per host
The medians above before averaging. Runs is how many measured runs went into each median. Host names link to the deployment.
| Build | Path | Host | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Runs | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Angular (SSR) | |||||||||||||
| baseline | / | Vercel | 89 | (good)0.78 | 0.28 | (needs improvement)3.76 | (good)33 | (good)0.000 | 1.03 | 3.76 | 241 | 3/3 | OK |
| baseline | / | Netlify | 89 | (good)0.80 | 0.23 | (needs improvement)3.76 | (good)32 | (good)0.000 | 1.18 | 3.76 | 119 | 3/3 | OK |
| baseline | / | Cloudflare | 89 | (good)0.78 | 0.56 | (needs improvement)3.76 | (good)18 | (good)0.000 | 1.24 | 3.76 | 451 | 3/3 | OK |
| baseline | /10145787 | Vercel | 99 | (good)0.78 | 0.19 | (good)2.10 | (good)3 | (good)0.000 | 1.05 | 2.28 | 140 | 3/3 | OK |
| baseline | /10145787 | Netlify | 99 | (good)0.78 | 0.24 | (good)1.96 | (good)0 | (good)0.000 | 1.08 | 1.96 | 175 | 3/3 | OK |
| baseline | /10145787 | Cloudflare | 99 | (good)0.78 | 0.28 | (good)2.11 | (good)5 | (good)0.000 | 1.13 | 2.33 | 212 | 3/3 | OK |
| optimized | / | Vercel | 87 | (good)0.78 | 1.32 | (poor)4.06 | (good)41 | (good)0.000 | 2.17 | 4.06 | 245 | 3/3 | OK |
| optimized | / | Netlify | 85 | (good)0.79 | 2.30 | (poor)4.06 | (good)45 | (good)0.000 | 3.60 | 4.06 | 182 | 3/3 | OK |
| optimized | / | Cloudflare | 89 | (good)0.83 | 0.71 | (needs improvement)3.61 | (good)20 | (good)0.000 | 1.73 | 3.61 | 396 | 3/3 | OK |
| optimized | /10145787 | Vercel | 98 | (good)0.78 | 1.30 | (good)2.44 | (good)7 | (good)0.000 | 2.50 | 2.44 | 158 | 3/3 | OK |
| optimized | /10145787 | Netlify | 98 | (good)0.78 | 1.25 | (good)2.41 | (good)47 | (good)0.000 | 2.47 | 2.41 | 123 | 3/3 | OK |
| optimized | /10145787 | Cloudflare | 100 | (good)0.79 | 0.84 | (good)1.81 | (good)23 | (good)0.000 | 1.78 | 2.15 | 372 | 3/3 | OK |