title: Using ngModel with Reactive forms
body: <p>In my application I was using template driven validation but now I have to switch to Model driven approach but I did not want to remove two way data binding.So my html controls were like that</p>
  
  <pre><code>form [formGroup]="myForm"&gt;
      input type="checkbox" [(ngModel)]="selected.HasFull" formControlName="HasFull" /
  </code></pre>
  
  <p>But it started to throw this error</p>
  
  <blockquote>
  <pre><code>  ngModel cannot be used to register form controls with a parent formGroup directive.  Try using
    formGroup's partner directive "formControlName" instead.  Example:
  </code></pre>
  </blockquote>
  
  <pre><code>div [formGroup]="myGroup"&gt;
    input formControlName="firstName"
  /div
  
  In your class:
  
  this.myGroup = new FormGroup({
     firstName: new FormControl()
  });
  
    Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:
  
    Example:
  
  
  div [formGroup]="myGroup"&gt;
     input formControlName="firstName"&gt;
     input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}"
  &lt;/div
  </code></pre>
  
  <p>Then I added this [ngModelOptions]="{standalone: true}" to my html controls but it gave me the error [ngModelOptions] is not a known property of input.</p>
  
  <blockquote>
    <p><strong>Update</strong>
    the problem of not a known property of input went away when I replaced [ngModelOptions] with ng-model-options but I was still getting the error "ngModel cannot be used to register form controls with a parent formGroup directive."
    I had two fields on the form which did not require validation so they did not have formControlName attribute. As a work around I made those two fields part of my fromgroup and added the formControlName attribute on them and it is working fine now.Although I did not require validation for these two fields but at least I'm not getting an error.</p>
  </blockquote>