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

Function updateControl

packages/forms/src/directives/shared.ts:285–290  ·  view source on GitHub ↗
(control: FormControl, dir: NgControl)

Source from the content-addressed store, hash-verified

283}
284
285function updateControl(control: FormControl, dir: NgControl): void {
286 if (control._pendingDirty) control.markAsDirty();
287 control.setValue(control._pendingValue, {emitModelToViewChange: false});
288 dir.viewToModelUpdate(control._pendingValue);
289 control._pendingChange = false;
290}
291
292function setUpModelChangePipeline(control: FormControl, dir: NgControl): void {
293 const onChange = (newValue?: any, emitModelEvent?: boolean) => {

Callers 2

setUpViewChangePipelineFunction · 0.85
setUpBlurPipelineFunction · 0.85

Calls 3

markAsDirtyMethod · 0.65
setValueMethod · 0.65
viewToModelUpdateMethod · 0.45

Tested by

no test coverage detected