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

Class HiddenTestCmp

packages/forms/signals/test/web/form_field.spec.ts:5236–5246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5234 }
5235
5236 @Component({
5237 template: ` <my-input [formField]="f" /> `,
5238 imports: [CustomInput, FormField],
5239 })
5240 class HiddenTestCmp {
5241 myInput = viewChild.required<CustomInput>(CustomInput);
5242 data = signal('');
5243 f = form(this.data, (p) => {
5244 hidden(p, {when: ({value}) => value() === ''});
5245 });
5246 }
5247
5248 const comp = act(() => TestBed.createComponent(HiddenTestCmp)).componentInstance;
5249 expect(comp.myInput().hidden()).toBe(true);

Callers

nothing calls this directly

Calls 6

ComponentInterface · 0.90
signalFunction · 0.90
formFunction · 0.85
hiddenFunction · 0.85
valueFunction · 0.85
requiredMethod · 0.45

Tested by

no test coverage detected