Architecture: How to make Angular SPA legal pages bot-readable (static HTM...

Documentation for Sessions

🏗️ Architecture: How to make Angular SPA legal pages bot-readable (static HTM...

Date: 2026-02-18
Time: 19:42:13 UTC
Session: gspace1-119.2
Agent: angular
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

How to make Angular SPA legal pages bot-readable (static HTML for crawlers)?

Task: Pre-render legal pages as static HTML for bot readability


🎯 Decision Made

Chosen:

Angular 20 route-level RenderMode.Prerender with outputMode: 'static' — no Node.js server needed at runtime

Options Considered:

  1. Angular 20 RenderMode.Prerender with outputMode static
  2. Puppeteer headless build-time rendering
  3. Separate static HTML files outside Angular
  4. Full SSR with Node.js Express server

💭 Reasoning

Angular 20's @angular/ssr provides route-level RenderMode which lets us prerender only specific routes (legal pages) while keeping the rest as client-side SPA. outputMode: 'static' generates plain HTML files deployable to any CDN — no server infrastructure change. Alternatives considered: (1) Puppeteer build-time rendering — fragile, heavy dep; (2) Separate static HTML files — content duplication, no Angular interactivity; (3) Full SSR with Node.js — overkill for static legal pages. The chosen approach is the official Angular solution, minimal code change (~4 new files + guards on existing initializers), and sets up the foundation for prerendering landing, docs, and marketing pages later.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation