| 4950 | } |
| 4951 | |
| 4952 | @Component({ |
| 4953 | template: ` <my-input [formField]="f" /> `, |
| 4954 | imports: [CustomInput, FormField], |
| 4955 | }) |
| 4956 | class ReadonlyTestCmp { |
| 4957 | myInput = viewChild.required<CustomInput>(CustomInput); |
| 4958 | data = signal(''); |
| 4959 | f = form(this.data, (p) => { |
| 4960 | disabled(p, {when: () => 'Currently unavailable'}); |
| 4961 | }); |
| 4962 | } |
| 4963 | |
| 4964 | const comp = act(() => TestBed.createComponent(ReadonlyTestCmp)).componentInstance; |
| 4965 |