Skip to content

fix(renderer): stop NG0400 on every render in bootstrapApplication apps - #8

Merged
aFlamee merged 1 commit into
developfrom
fix/render-tree-app-platform
Nov 15, 2026
Merged

aFlamee merged 1 commit into
developfrom
fix/render-tree-app-platform

Conversation

@aFlamee

@aFlamee aFlamee commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Every PDF render threw NG0400: A platform with a different configuration has been created in dev builds of apps started with bootstrapApplication, the default for standalone Angular apps. Production builds skip that check, and TestBed tests use a platform that passes it, so neither caught the bug.

renderTree parented its injector on platformCore(). bootstrapApplication creates its platform without the marker that platformCore() asserts in dev mode. renderTree now reuses the existing platform via getPlatform() and falls back to platformCore() for scripts and servers that have none. Both bases install this one shared file, so the regenerated forme/utils.json and takumi/utils.json carry the fix.

Proof: the new test in tests/behavior.test.ts creates the platform the way bootstrapApplication does. It fails with NG0400 before the fix and passes after. In a browser on the vite dev server, a real bootstrapApplication call followed by renderFormeDocument threw NG0400 before the fix. After it, Forme and Takumi both render. pnpm verify passes.

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

renderTree parented its injector on platformCore(). bootstrapApplication
creates its platform without the core marker, so platformCore() threw
NG0400 on every render in dev mode. Reuse the existing platform and keep
platformCore() as the fallback when none exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pdfcn-angular Ready Ready Preview Nov 15, 2026 10:03pm UTC

@aFlamee
aFlamee merged commit ceafe4d into develop Nov 15, 2026
3 checks passed
@aFlamee
aFlamee deleted the fix/render-tree-app-platform branch November 15, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant