| 4990 | } |
| 4991 | |
| 4992 | @Component({ |
| 4993 | template: ` <my-input [formField]="f" /> `, |
| 4994 | imports: [CustomInput, FormField], |
| 4995 | }) |
| 4996 | class ReadonlyTestCmp { |
| 4997 | myInput = viewChild.required<CustomInput>(CustomInput); |
| 4998 | data = signal(''); |
| 4999 | f = form(this.data, (p) => { |
| 5000 | disabled(p, {when: () => 'Currently unavailable'}); |
| 5001 | }); |
| 5002 | } |
| 5003 | |
| 5004 | const comp = act(() => TestBed.createComponent(ReadonlyTestCmp)).componentInstance; |
| 5005 |