Schema guides Platform
How to add schema to Angular
Category: framework
Plugins and apps
- @angular/platform-browser
- Angular Universal
Manual implementation
Universal: inject JSON-LD in server template; CSR-only: prerender or accept weaker crawling signals.
Troubleshooting
- Schema missing in crawlers
Add Universal or prerender for indexable routes. - XSS in dynamic JSON
Sanitize or strictly type user fields before stringifying.
Overview
Angular Universal (or prerender) is the right baseline for JSON-LD on marketing sites. The Meta/Title services manage tags, but crawlers need the initial HTML to include application/ld+json.
Use resolvers or guards so head data is ready before render completes.