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

Class HiddenTestCmp

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

Source from the content-addressed store, hash-verified

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