What problem does it solve?
Provides clear guidance and best practices to implement server-side rendering, client hydration, and prerendering in Angular applications to improve SEO, initial load performance, and route-specific rendering behavior while avoiding duplicate HTTP requests and hydration pitfalls.
Core Features & Use Cases
- SSR & Hydration Guidance: Instructions for enabling Angular SSR, using provideClientHydration, and handling hydration opt-outs with ngSkipHydration.
- Incremental and Hybrid Rendering: Patterns for incremental hydration, per-route render modes, and deferrable views to balance performance and interactivity.
- TransferState & Server Logic: Recommendations for TransferState to prevent duplicate requests and platform checks (isPlatformServer/isPlatformBrowser) for environment-specific code.
- Use Case: Prerender a content-heavy blog for SEO while incrementally hydrating interactive widgets and configuring some routes to render client-side for personalized dashboards.
Quick Start
Add @angular/ssr to your project, enable client hydration with provideClientHydration, and configure incremental or hybrid rendering per route.