Repository navigation
fix(renderer): stop NG0400 on every render in bootstrapApplication apps - #8
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every PDF render threw
NG0400: A platform with a different configuration has been createdin dev builds of apps started withbootstrapApplication, 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.renderTreeparented its injector onplatformCore().bootstrapApplicationcreates its platform without the marker thatplatformCore()asserts in dev mode.renderTreenow reuses the existing platform viagetPlatform()and falls back toplatformCore()for scripts and servers that have none. Both bases install this one shared file, so the regeneratedforme/utils.jsonandtakumi/utils.jsoncarry the fix.Proof: the new test in
tests/behavior.test.tscreates the platform the waybootstrapApplicationdoes. It fails with NG0400 before the fix and passes after. In a browser on the vite dev server, a realbootstrapApplicationcall followed byrenderFormeDocumentthrew NG0400 before the fix. After it, Forme and Takumi both render.pnpm verifypasses.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