Angular can render a route in the browser, generate its HTML at build time, or render it on a server for each request. Its hybrid-rendering setup lets you choose per route: prerender stable public pages, use server-side rendering (SSR) when the initial response needs request-specific data, and keep browser-dependent routes client-rendered (CSR) where that fits. The right choice depends on the route’s data, server compatibility, deployment, and caching—not on a blanket promise of faster pages or higher rankings.
What happens when Angular renders on the server?
With SSR, Angular generates HTML on the server in response to a page request. The browser can receive a document containing rendered application content before it downloads and executes the full client application. Angular then starts in the browser and takes over the rendered page through hydration.
As an Amazon Associate I earn from qualifying purchases.
Hydration restores the server-rendered application on the client and reuses its DOM where possible. Angular’s hydration guide explains that without hydration, the server-rendered content is destroyed and rendered again in the browser, which can cause visible flicker and layout shifts. Angular CLI-created SSR applications include hydration.
SSR does not eliminate client-side JavaScript: it changes how the initial HTML is produced. The browser still initializes the application, and interactive behavior still depends on the client code.
#1 Best Overall
How CSR, prerendering, and SSR differ
| Mode | When Angular renders HTML | Visitor-specific data | Rendering at request time | Key trade-off |
|---|---|---|---|---|
CSR (RenderMode.Client) |
In the browser | Can be loaded after client logic runs | No server rendering for the route | Content may wait for JavaScript execution and data requests; browser-dependent features fit naturally. |
Prerendering / SSG (RenderMode.Prerender) |
At build time | No, not when the data varies by visitor | No per-request rendering | Static files can be served with little rendering work per request, but build time and deployment output can grow. |
SSR (RenderMode.Server) |
On each request | Yes, if implemented securely and scoped to that request | Yes | Provides rendered initial HTML, but requires server work and code that can run on the server. |
Angular defines these modes in its RenderMode API reference. The Angular v20 SSR guide describes prerendering as generally favorable for SEO because crawlers receive rendered HTML. That does not establish a ranking guarantee: search outcomes depend on the site and implementation. Nor does a rendering mode alone establish which app will be faster; assess the actual routes and deployment.
Choose a mode based on each route
Use prerendering for stable, build-time content
Prerender pages when their content can be generated during the build and does not need to reflect the individual visitor or a value that changes at request time. An about page is a typical example. Static HTML can be served from a static host or CDN without rendering the page on every request.
Rank #2
For parameterized routes, Angular must be able to enumerate the needed route parameters during the build. Generating a large number of pages can increase build time, output size, and deployment time, so include page volume in the decision.
Use SSR for request-specific initial content
SSR suits routes whose initial HTML needs data available for a particular request, such as a profile page. It requires a server runtime to render the route, and the implementation must keep data correctly scoped to each request. Avoid caching personalized HTML in a shared cache in a way that could expose one visitor’s content to another.
Rank #3
Use CSR where browser behavior is central
CSR can be appropriate for browser-dependent functionality or routes where a browser-oriented development model is preferable. It avoids server-side rendering work for that route, but meaningful content may not appear until client JavaScript runs and any required data requests finish. Angular’s v20 guide also notes that client-rendered content can be subject to crawler limits on JavaScript execution.
Mix modes in one Angular app
Hybrid rendering means these choices do not have to be app-wide. Angular’s documented example assigns CSR to /, prerendering to a static /about route, and SSR to a personalized /profile route, with a server-rendered catch-all. These are examples, not mandatory assignments; map each route to its data needs and runtime constraints.
Rank #4
How to add SSR and configure route modes
Angular’s current hybrid-rendering guide documents these CLI entry points. Check the actual Angular version in your project before relying on version-sensitive command output or defaults.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems- For a new application: create it with
ng new --ssr. - For an existing application: add SSR with
ng add @angular/ssr. - Assign rendering modes by route: in the server routes configuration, set each route to
RenderMode.Client,RenderMode.Prerender, orRenderMode.Server, as appropriate to its data and runtime needs. - Check parameterized prerender routes: ensure the values needed to generate their pages can be enumerated at build time.
- Choose an output and deployment that match: request-time SSR needs a server-side rendering runtime; static output can be hosted as files.
Angular’s hybrid-rendering guide documents outputMode: 'static', which produces prerendered HTML without generating a server file. Use it only when the needed route output can be created at build time. A static document cannot contain visitor-specific data unless the browser fetches that data later.
Check server compatibility and correctness
Code that assumes browser globals exist cannot automatically run during server rendering. Angular’s v19 SSR guidance identifies window, document, navigator, and location as examples that may be unavailable on the server. Keep browser-only work out of server execution paths. The v19 documentation describes afterRender and afterNextRender as browser-only hooks for browser-dependent operations; verify their current behavior against the Angular version your app uses.
- Inspect the initial HTTP response and confirm it contains the expected route content.
- Confirm hydration reuses the server-rendered DOM without visible replacement or mismatches.
- Check that data included in returned HTML is safe and scoped to the correct request.
- Review cache rules so personalized responses are not served to other visitors.
- Estimate whether the number of prerendered parameter combinations is practical for your build and deployment.
- Verify that the deployment supports the selected output: a server runtime for request-time SSR, or static-file hosting for static output.
Angular’s incremental hydration guide documents a related hydration feature. It is separate from the basic distinction between rendering a route on the client, at build time, or per request.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.




