(newValue?: any, emitModelEvent?: boolean)
| 290 | |
| 291 | function setUpModelChangePipeline(control: FormControl, dir: NgControl): void { |
| 292 | const onChange = (newValue?: any, emitModelEvent?: boolean) => { |
| 293 | // control -> view |
| 294 | dir.valueAccessor!.writeValue(newValue); |
| 295 | |
| 296 | // control -> ngModel |
| 297 | if (emitModelEvent) dir.viewToModelUpdate(newValue); |
| 298 | }; |
| 299 | control.registerOnChange(onChange); |
| 300 | |
| 301 | // Register a callback function to cleanup onChange handler |
no test coverage detected
searching dependent graphs…