MCPcopy
hub / github.com/angular/angular / ReproCmp

Class ReproCmp

packages/forms/signals/test/web/orphan_repro.spec.ts:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13describe('Signal Forms array removal orphan repro', () => {
14 it('should not throw orphan field error when a focused input in an array is removed', async () => {
15 @Component({
16 imports: [FormField],
17 template: `
18 <div>
19 @for (child of f.items; track $index) {
20 <input [formField]="child.name" [id]="'input-' + $index" />
21 }
22 </div>
23 `,
24 })
25 class ReproCmp {
26 readonly model = signal({
27 items: [{name: 'one'}, {name: 'two'}],
28 });
29 readonly f = form(this.model);
30 }
31
32 const fixture = TestBed.createComponent(ReproCmp);
33 const appRef = TestBed.inject(ApplicationRef);

Callers

nothing calls this directly

Calls 13

ComponentInterface · 0.90
signalFunction · 0.90
resourceFunction · 0.90
formFunction · 0.85
applyEachFunction · 0.85
debounceFunction · 0.85
validateAsyncFunction · 0.85
rejectFunction · 0.85
valueMethod · 0.65
addEventListenerMethod · 0.65
joinMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…