
This is a clear breakdown of SSR (Server-Side Rendering) vs SSG (Static Site Generation) in Angular—explaining how they work, key differences like runtime vs build-time rendering, hydration behavior, server requirements, and how to choose the right strategy per route.
Alain Chautard
February 26, 2026
I’ve covered server-side rendering in the past, but recently realized that people get confused about SSR and SSG.
What’s the difference? SSR stands for Server-Side Rendering, and it does what it says: when requested, an Angular route is rendered on the server before being sent to the client as HTML syntax.
Then, the browser loads Angular’s JavaScript code, and the process of hydration starts: Angular takes over the “static” DOM built from our server and hooks its component code to it. In other words, front-end JavaScript takes over from that point on.
SSG stands for Static Site Generation, and the process is very much the same as SSR, with one significant difference: SSG is performed at build time, not at runtime. This is important for several reasons:
Now, how to choose between the two options? Well, the good news is that it doesn’t have to be the same choice for all routes. In an SSR app, a server-side router config is generated, and that file can be tweaked to do SSR, SSG, or even just client-side rendering based on the route:

The above example makes perfect sense: An about page doesn’t change between builds. It can be pre-rendered with SSG.
A profile page depends on user data, so this doesn’t make sense to pre-render at build time. SSR or client-side rendering are the two best options.
Last but not least, what if we want to pre-render routes that use parameters? We can do so by adding a list of param values to pre-render routes with the getPrerenderParams function:

The above example would have the Angular compiler pre-render the routes for /post/1/foo/3 and /post/2/bar/4 at build time.
Get the latest news and updates on developer certifications. Content is updated regularly, so please make sure to bookmark this page or sign up to get the latest content directly in your inbox.

Server-side rendering: SSR or SSG, what’s the difference?
This is a clear breakdown of SSR (Server-Side Rendering) vs SSG (Static Site Generation) in Angular—explaining how they work, key differences like runtime vs build-time rendering, hydration behavior, server requirements, and how to choose the right strategy per route.
Alain Chautard
Feb 26, 2026

React Docs Refresh: useActionState and useOptimistic
The React docs for useActionState and useOptimistic have been rewritten with clearer naming, new interactive sandboxes, and patterns from simple pending states to shopping carts with error recovery. Here's what changed and why it matters.
Aurora Scharff
Feb 24, 2026

JavaScript Mistakes That Quietly Destroy Production Apps
Some JavaScript mistakes don’t crash your app, they slowly degrade performance, reliability, and user trust. Here are the ones that cost the most in production.
Martin Ferret
Feb 19, 2026
We can help you recruit Certified Developers for your organization or project. The team has helped many customers employ suitable resources from a pool of 100s of qualified Developers.
Let us help you get the resources you need.
