Add framework support for binding form controls#63773
Closed
leonsenft wants to merge 5 commits intoangular:mainfrom
Closed
Add framework support for binding form controls#63773leonsenft wants to merge 5 commits intoangular:mainfrom
leonsenft wants to merge 5 commits intoangular:mainfrom
Conversation
e205267 to
4b76845
Compare
4b76845 to
8cb921c
Compare
kirjs
approved these changes
Sep 16, 2025
| } | ||
|
|
||
| /** | ||
| * An operation that checks if a specialized control directive exists and possibly registers it to |
Contributor
There was a problem hiding this comment.
nit: I'd replace possibly -> if not |if yes
Contributor
Author
There was a problem hiding this comment.
It's more nuanced than that. The presence of the directive isn't sufficient to determine whether or not the control directive is registered/set up. I've reworded it to be more clear.
185f736 to
a77a6c4
Compare
mmalerba
suggested changes
Sep 26, 2025
mmalerba
suggested changes
Oct 2, 2025
mmalerba
approved these changes
Oct 3, 2025
mmalerba
approved these changes
Oct 3, 2025
Contributor
mmalerba
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
* Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property bindings named "control". This instruction cannot be chained, but is otherwise functionally equivalent. * Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal form field to a UI control (be it a native element or custom directive).
Move most of the implementation of the `Control` directive into core
framework instructions. This allows field state changes to be propagated
to their corresponding UI controls directly during execution of a
template update block, instead of relying on `effect()`s to synchronize
each change later during the update (and too late in the case of
required inputs).
* Define a private API in `@angular/core` for signal forms to implement:
* `ɵControl` for the `Control` directive.
* `ɵFieldState` for the control's associated `FieldState`.
* Emit specialized instructions when compiling a `[control]` binding:
* `ɵɵcontrolCreate` sets up the `ɵControl` directive if present,
determines whether it's bound to a native control element or a
custom control component, and adds the appropriate event listeners
to notify the `ɵFieldState` of UI changes.
* `ɵɵcontrol` propagates changes from `ɵFieldState` properties to their
corresponding UI control properties (in additional to binding the `control`
property itself).
8b1552c to
2749074
Compare
kirjs
approved these changes
Oct 3, 2025
Contributor
|
caretaker: wait for TGP to merge |
Contributor
|
This PR was merged into the repository. The changes were merged into the following branches:
|
mmalerba
pushed a commit
that referenced
this pull request
Oct 4, 2025
Move most of the implementation of the `Control` directive into core
framework instructions. This allows field state changes to be propagated
to their corresponding UI controls directly during execution of a
template update block, instead of relying on `effect()`s to synchronize
each change later during the update (and too late in the case of
required inputs).
* Define a private API in `@angular/core` for signal forms to implement:
* `ɵControl` for the `Control` directive.
* `ɵFieldState` for the control's associated `FieldState`.
* Emit specialized instructions when compiling a `[control]` binding:
* `ɵɵcontrolCreate` sets up the `ɵControl` directive if present,
determines whether it's bound to a native control element or a
custom control component, and adds the appropriate event listeners
to notify the `ɵFieldState` of UI changes.
* `ɵɵcontrol` propagates changes from `ɵFieldState` properties to their
corresponding UI control properties (in additional to binding the `control`
property itself).
PR Close #63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 10, 2025
…ngular#63773) * Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property bindings named "control". This instruction cannot be chained, but is otherwise functionally equivalent. * Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal form field to a UI control (be it a native element or custom directive). PR Close angular#63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 10, 2025
…ngular#63773) * Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property bindings named "control". This instruction cannot be chained, but is otherwise functionally equivalent. * Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal form field to a UI control (be it a native element or custom directive). PR Close angular#63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 10, 2025
…lar#63773) Move most of the implementation of the `Control` directive into core framework instructions. This allows field state changes to be propagated to their corresponding UI controls directly during execution of a template update block, instead of relying on `effect()`s to synchronize each change later during the update (and too late in the case of required inputs). * Define a private API in `@angular/core` for signal forms to implement: * `ɵControl` for the `Control` directive. * `ɵFieldState` for the control's associated `FieldState`. * Emit specialized instructions when compiling a `[control]` binding: * `ɵɵcontrolCreate` sets up the `ɵControl` directive if present, determines whether it's bound to a native control element or a custom control component, and adds the appropriate event listeners to notify the `ɵFieldState` of UI changes. * `ɵɵcontrol` propagates changes from `ɵFieldState` properties to their corresponding UI control properties (in additional to binding the `control` property itself). PR Close angular#63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 11, 2025
…ngular#63773) * Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property bindings named "control". This instruction cannot be chained, but is otherwise functionally equivalent. * Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal form field to a UI control (be it a native element or custom directive). PR Close angular#63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 11, 2025
…ngular#63773) * Emit a `ɵɵcontrol` instruction in place of `ɵɵproperty` for property bindings named "control". This instruction cannot be chained, but is otherwise functionally equivalent. * Upcoming changes will use the `ɵɵcontrol` instruction to bind a signal form field to a UI control (be it a native element or custom directive). PR Close angular#63773
napulitanfrontend
pushed a commit
to napulitanfrontend/angular
that referenced
this pull request
Oct 11, 2025
…lar#63773) Move most of the implementation of the `Control` directive into core framework instructions. This allows field state changes to be propagated to their corresponding UI controls directly during execution of a template update block, instead of relying on `effect()`s to synchronize each change later during the update (and too late in the case of required inputs). * Define a private API in `@angular/core` for signal forms to implement: * `ɵControl` for the `Control` directive. * `ɵFieldState` for the control's associated `FieldState`. * Emit specialized instructions when compiling a `[control]` binding: * `ɵɵcontrolCreate` sets up the `ɵControl` directive if present, determines whether it's bound to a native control element or a custom control component, and adds the appropriate event listeners to notify the `ɵFieldState` of UI changes. * `ɵɵcontrol` propagates changes from `ɵFieldState` properties to their corresponding UI control properties (in additional to binding the `control` property itself). PR Close angular#63773
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Move most of the implementation of the
Controldirective into core framework instructions. This allows field state changes to be propagated to their corresponding UI controls directly during execution of a template update block, instead of relying oneffect()s to synchronize each change later during the update (and too late in the case of required inputs).@angular/corefor signal forms to implement:ɵControlfor theControldirective.ɵFieldStatefor the control's associatedFieldState.[control]binding:ɵɵcontrolCreatesets up theɵControldirective if present, determines whether it's bound to a native control element or a custom control component, and adds the appropriate event listeners to notify theɵFieldStateof UI changes.ɵɵcontrolpropagates changes fromɵFieldStateproperties to their corresponding UI control properties (in additional to binding thecontrolproperty itself).Future changes will focus on optimizing the instructions:
TNodemax/minfor number or date)