| 4931 | } |
| 4932 | |
| 4933 | @Component({ |
| 4934 | template: ` <my-input [formField]="f" /> `, |
| 4935 | imports: [CustomInput, FormField], |
| 4936 | }) |
| 4937 | class ReadonlyTestCmp { |
| 4938 | myInput = viewChild.required<CustomInput>(CustomInput); |
| 4939 | data = signal(''); |
| 4940 | f = form(this.data, (p) => { |
| 4941 | disabled(p, {when: () => 'Currently unavailable'}); |
| 4942 | }); |
| 4943 | } |
| 4944 | |
| 4945 | const comp = act(() => TestBed.createComponent(ReadonlyTestCmp)).componentInstance; |
| 4946 |