I have a working template driven Angular 2 form. One of the fields uses an external module (ng2-bootstrap typeahead). [(ngModel)] two way binding points to an object in my component.
If I include name="companyName" attribute in that control, on submit I get the companyName: value under form.value object, which I don't want to, because I use ngModel bound property I've set in component. I can't remove name attribute from that control, if I do, I get an error stating that I need to use: [ngModelOptions]="{standalone: true}"
So I did that, but then when I make any change in the value, form's pristine property doesn't get affected since any model connection is cut off by above statement. I've tried to set form's pristine property on custom control's update event, doesn't work since pristine property of form is read only.
Is there a way for template driven Angular2 form control's to be defined in such a way that they affect form's validity, but their value is not included in form.value collection?