MCPcopy Index your code
hub / github.com/angular/angular / _forEachChild

Method _forEachChild

packages/forms/src/model/form_group.ts:600–608  ·  view source on GitHub ↗

@internal

(cb: (v: any, k: any) => void)

Source from the content-addressed store, hash-verified

598
599 /** @internal */
600 override _forEachChild(cb: (v: any, k: any) => void): void {
601 Object.keys(this.controls).forEach((key) => {
602 // The list of controls can change (for ex. controls might be removed) while the loop
603 // is running (as a result of invoking Forms API in `valueChanges` subscription), so we
604 // have to null check before invoking the callback.
605 const control = (this.controls as any)[key];
606 control && cb(control, key);
607 });
608 }
609
610 /** @internal */
611 _setUpControls(): void {

Callers 3

resetMethod · 0.95
_setUpControlsMethod · 0.95
_reduceChildrenMethod · 0.95

Calls 3

keysMethod · 0.65
cbFunction · 0.50
forEachMethod · 0.45

Tested by

no test coverage detected