angular/packages/compiler-cli
Leon Senft 9748b0d5da fix(forms): support custom controls with non signal-based models
* Recognize directives with non signal-based models as valid custom controls
* Relax type checker to allow non signal-based models

The `FormValueControl` and `FormCheckboxControl` interfaces still
require a `model()`-input, however, a custom control need not implement
either interface to be bound by the `Field` directive.

All of the following examples can be used to define a custom control:

```ts
// Preferred: model()
class MyFormControl implements FormValueControl<string> {
  readonly value: model.required<string>();
}

// Supported: input() + output()
class MyFormControl {
  readonly value: input.required<string>();
  readonly valueChange: output<string>();
}

// Supported: @Input() + @Output()
class MyFormControl {
  @Input({required: true}) value!: string;
  @Output() valueChange: new EventEmitter<string>();
}
```

The latter two may still choose to implement `FormUiControl` for other
properties, but again it is not required.

Fix #65478

(cherry picked from commit cb09fb8308)
2026-01-02 08:09:07 +01:00
..
linker refactor(compiler): remove unused code 2025-11-11 10:04:32 -08:00
private Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)" 2025-11-06 13:09:27 -08:00
src fix(forms): support custom controls with non signal-based models 2026-01-02 08:09:07 +01:00
test refactor(compiler): remove unnecessary sanitization for safe attributes 2025-12-15 14:13:42 -08:00
BUILD.bazel Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)" 2025-11-06 13:09:27 -08:00
esbuild.config.js build: use esbuild from aspect rules (#62568) 2025-07-10 13:45:15 -07:00
index.ts refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core 2025-10-28 15:58:59 +01:00
package.json refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core 2025-10-28 15:58:59 +01:00
tsconfig-test.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
tsconfig.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00