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

Class HiddenTestCmp

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

Source from the content-addressed store, hash-verified

5007 }
5008
5009 @Component({
5010 template: ` <my-input [formField]="f" /> `,
5011 imports: [CustomInput, FormField],
5012 })
5013 class HiddenTestCmp {
5014 myInput = viewChild.required<CustomInput>(CustomInput);
5015 data = signal('');
5016 f = form(this.data, (p) => {
5017 hidden(p, {when: ({value}) => value() === ''});
5018 });
5019 }
5020
5021 const comp = act(() => TestBed.createComponent(HiddenTestCmp)).componentInstance;
5022 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