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

Function syncPendingControls

packages/forms/src/directives/shared.ts:386–398  ·  view source on GitHub ↗
(
  form: AbstractControl,
  directives: Set<NgControl> | NgControl[],
)

Source from the content-addressed store, hash-verified

384}
385
386export function syncPendingControls(
387 form: AbstractControl,
388 directives: Set<NgControl> | NgControl[],
389): void {
390 form._syncPendingControls();
391 directives.forEach((dir: NgControl) => {
392 const control = dir.control as FormControl;
393 if (control.updateOn === 'submit' && control._pendingChange) {
394 dir.viewToModelUpdate(control._pendingValue);
395 control._pendingChange = false;
396 }
397 });
398}
399
400// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented
401export function selectValueAccessor(

Callers 2

onSubmitMethod · 0.90
onSubmitFunction · 0.90

Calls 3

_syncPendingControlsMethod · 0.65
forEachMethod · 0.45
viewToModelUpdateMethod · 0.45

Tested by

no test coverage detected