| 5177 | } |
| 5178 | |
| 5179 | @Component({ |
| 5180 | template: ` <my-input [formField]="f" /> `, |
| 5181 | imports: [CustomInput, FormField], |
| 5182 | }) |
| 5183 | class ReadonlyTestCmp { |
| 5184 | myInput = viewChild.required<CustomInput>(CustomInput); |
| 5185 | data = signal(''); |
| 5186 | f = form(this.data, (p) => { |
| 5187 | disabled(p, {when: () => 'Currently unavailable'}); |
| 5188 | }); |
| 5189 | } |
| 5190 | |
| 5191 | const comp = act(() => TestBed.createComponent(ReadonlyTestCmp)).componentInstance; |
| 5192 |