MCPcopy Create free account
hub / github.com/angular/angular / MyFvcInput

Class MyFvcInput

packages/forms/signals/test/web/reactive_fvc.spec.ts:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40import {SignalFormControl} from '../../compat';
41
42@Component({
43 selector: 'my-fvc-input',
44 template:
45 '<input #i [value]="value()" (input)="value.set(i.value)" (blur)="touch.emit()" [disabled]="disabled()" />',
46})
47class MyFvcInput implements FormValueControl<string> {
48 readonly value = model('');
49 readonly touch = output<void>();
50 readonly disabled = input(false);
51 readonly touched = input(false);
52 readonly dirty = input(false);
53 readonly valid = input(true);
54 readonly invalid = input(false);
55 readonly pending = input(false);
56 readonly required = input(false);
57 readonly errors = input<readonly any[]>([]);
58}
59
60describe('FormControlDirective with FVC', () => {
61 it('should sync FormControl value to FVC (model -> view)', () => {

Callers

nothing calls this directly

Calls 2

ComponentInterface · 0.90
outputFunction · 0.90

Tested by

no test coverage detected