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