How can I bind a form to a model in Angular 6 using reactive forms?
问题 Prior to angular 6, I was using [(ngModel)] to directly bind my form field to the model. This is now deprecated (can't use with reactive forms) and I am not sure how to update my model with the form values. I could use form.getRawValue() but this would require me to replace my current model with the new rawValue - this is not favourable since my main model is larger and has more fields than the local form model. Any ideas? 回答1: Don't use [(ngModel)] ! Reactive forms are much nicer. They make