angular/packages/core/test
Alex Rickabaugh a67e00741c refactor(forms): move control logic into FormField directive
Refactors the `ɵɵcontrolCreate` and `ɵɵcontrol` instructions to delegate control logic to the forms package via new `ɵngControlCreate` and `ɵngControlUpdate` lifecycle hooks. Previously, the logic for binding form state to native elements and custom controls was hardcoded within `@angular/core`.

**Compiler Changes:**
- Introduces a new compilation phase `specializeControlProperties` (in `control_directives.ts`).
- This phase detects properties named `formField` and specializes them into `ControlCreate` and `Control` IR opcodes.
- These opcodes emit `ɵɵcontrolCreate` and `ɵɵcontrol` instructions, respectively.

**Runtime Changes:**
- `ɵɵcontrolCreate` acts as the creation phase. It locates the control directive and invokes its `ɵngControlCreate` method.
- `ɵɵcontrol` acts as the update phase, and invokes the control directive's `ɵngControlUpdate` method (if present).
- Introduces a `passThroughInput` configuration in `ControlFeature`. This specifies the input name (e.g., `formField`) that triggers the control. If the runtime detects that this input is bound to multiple targets (e.g., the `FormField` directive *and* the host component), the control is flagged as "pass-through". In this state, `ɵngControlCreate` returns a no-op update function, deferring responsibility to the other consumer (e.g., the component managing the field itself).

**Forms Changes:**
- `FormField` directive implements `ɵngControlCreate` and `ɵngControlUpdate`.
- Inside this hook, `FormField` determines the type of control it is attached to (Native, CVA, or Custom Signal Control) and delegates to the appropriate handler (`nativeControlCreate`, `cvaControlCreate`, or `customControlCreate`).
- Consolidates all form binding logic within `@angular/forms/signals`, enabling support for new `FormValueControl` and `FormCheckboxControl` interfaces.
- Reorganizes the codebase by moving `FormField` from `api/` to `directive/` and splitting the binding logic into semantic pieces:
    - `control_native.ts`, `control_cva.ts`, and `control_custom.ts` contain the specific handlers for each control type.
    - `native.ts` and `select.ts` provide helpers for native element discovery and select-specific synchronization.
    - `bindings.ts` manages the tracking and application of property/attribute bindings.
2026-01-29 13:17:40 -08:00
..
acceptance fix(core): prevent element duplication with dynamic components 2026-01-29 12:18:00 -08:00
animation_utils refactor(core): dispatch enter and leave animations at the right times (#63450) 2025-09-10 22:24:00 +00:00
authoring feat(core): make SimpleChanges generic (#64535) 2025-10-20 17:49:39 +00:00
bundling refactor(forms): move control logic into FormField directive 2026-01-29 13:17:40 -08:00
change_detection refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
compiler build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
debug feat(core): Add stability debugging utility 2025-12-17 15:43:05 -08:00
di refactor(core): update error message links to versioned docs (#66374) 2026-01-09 22:33:51 +00:00
dom build: migrate all ts_library in packages/core/test (#61472) 2025-05-20 10:00:43 +00:00
hydration fix(core): catch hydration marker with implicit body tag (#60429) 2025-03-19 15:51:36 +01:00
i18n refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
legacy_animation ci: reformat files 2025-12-16 14:44:19 -08:00
linker refactor(core): update error message links to versioned docs (#66374) 2026-01-09 22:33:51 +00:00
metadata refactor(core): improve resource loading with async/await 2025-11-11 12:50:16 -08:00
reflection refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
render3 refactor(forms): move control logic into FormField directive 2026-01-29 13:17:40 -08:00
resource feat(core): resource composition via snapshots 2026-01-12 13:49:56 -08:00
sanitization Revert "refactor(core): Add ngDevMode guards and new sanitization error codes" 2026-01-02 11:37:24 +01:00
signals refactor(core): expose isWritableSignal to the publicApi 2025-10-29 20:31:41 +00:00
strict_types build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
testability refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
util refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
zone ci: reformat files 2025-12-16 14:44:19 -08:00
application_config_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
application_init_spec.ts refactor(core): update error message links to versioned docs (#66374) 2026-01-09 22:33:51 +00:00
application_module_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
application_ref_integration_spec.ts refactor(core): Update tests for zoneless by default (#63668) 2025-09-09 14:41:56 -07:00
application_ref_spec.ts refactor(core): update error message links to versioned docs (#66374) 2026-01-09 22:33:51 +00:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
change_detection_scheduler_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
component_fixture_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
defer_fixture_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
dev_mode_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
directive_lifecycle_integration_spec.ts refactor(core): Update tests for zoneless by default (#63668) 2025-09-09 14:41:56 -07:00
error_handler_spec.ts build: migrate to use web test runner rules (#62292) 2025-06-26 17:19:10 +00:00
event_emitter_spec.ts refactor(core): Update tests for zoneless by default (#63668) 2025-09-09 14:41:56 -07:00
fake_async_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
forward_ref_integration_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
runtime_error_spec.ts refactor(core): update error message links to versioned docs (#66374) 2026-01-09 22:33:51 +00:00
test_bed_effect_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
test_bed_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
transfer_state_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
util_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00