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

Class HiddenTestCmp

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

Source from the content-addressed store, hash-verified

5048 }
5049
5050 @Component({
5051 template: ` <my-input [formField]="f" /> `,
5052 imports: [CustomInput, FormField],
5053 })
5054 class HiddenTestCmp {
5055 myInput = viewChild.required<CustomInput>(CustomInput);
5056 data = signal('');
5057 f = form(this.data, (p) => {
5058 hidden(p, {when: ({value}) => value() === ''});
5059 });
5060 }
5061
5062 const comp = act(() => TestBed.createComponent(HiddenTestCmp)).componentInstance;
5063 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