Skip to content

fix(angular): emit ɵɵControlFeature from linker for controlCreate metadata#232

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/linker-control-feature
Apr 16, 2026
Merged

fix(angular): emit ɵɵControlFeature from linker for controlCreate metadata#232
Brooooooklyn merged 1 commit intomainfrom
fix/linker-control-feature

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Apr 16, 2026

The Angular Linker's build_features was ignoring the controlCreate property
on ɵɵngDeclareDirective, so directives like @angular/forms/signals FormField
were linked without ɵɵControlFeature(passThroughInput). This left
DirectiveDef.controlDef unset at runtime, making template-emitted
ɵɵcontrolCreate()/ɵɵcontrol() calls no-ops and breaking [formField] bindings
with NG0950. Mirrors Angular TS compiler.ts:151-155.

Fixes #229

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Note

Low Risk
Small, targeted change to feature emission for a specific metadata field, with added regression tests reducing the chance of unintended output changes.

Overview
Fixes the linker’s build_features to recognize controlCreate in directive/component partial metadata and append ns.ɵɵControlFeature(passThroughInput) (string or null) to the generated features array in the correct order.

Adds regression coverage via new snapshot tests for both pass-through and null cases, plus an e2e fixture reproducing the [formField] alias binding issue from #229.

Reviewed by Cursor Bugbot for commit 9a00cca. Bugbot is set up for automated code reviews on this repo. Configure here.

…adata

The Angular Linker's build_features was ignoring the controlCreate property
on ɵɵngDeclareDirective, so directives like @angular/forms/signals FormField
were linked without ɵɵControlFeature(passThroughInput). This left
DirectiveDef.controlDef unset at runtime, making template-emitted
ɵɵcontrolCreate()/ɵɵcontrol() calls no-ops and breaking [formField] bindings
with NG0950. Mirrors Angular TS compiler.ts:151-155.

Fixes #229

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn merged commit fe0b0e6 into main Apr 16, 2026
9 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/linker-control-feature branch April 16, 2026 05:13
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.

formField directive broken when using oxc-angular plugin

1 participant