title: Angular 2 form validation touched and dirty gives back error, can't find out why
body: <p>So I have implemented a custom form validation for changing password. It works good, but I'm getting an error message, when the new password is typed, but the confirmPassword is not touched yet, because the two differ. I want to use validation.dirty and touched, to prevent this behaviour, but implementing it as it follows, Im getting the following error:</p>
  
  <p><code>There is no directive with "exportAs" set to "ngModel" ("mGroup]="password" type="password" class="form-control" id="confirmPassword" name="confirmPassword" [ERROR ->]#confirmPassword="ngModel"></code></p>
  
  <pre><code>&lt;form (ngSubmit)="changePassword()" [formGroup]="password"&gt;
  &lt;div class="form-group"&gt;
    &lt;label for="oldPassword"&gt;Old Password&lt;/label&gt;
    &lt;input type="password" class="form-control" id="oldPassword" name="oldPassword"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
    &lt;label for="password"&gt;New Password&lt;/label&gt;
    &lt;input formControlName="password" [formGroup]="password" type="password" class="form-control" id="password" name="password"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
    &lt;label for="confirmPassword"&gt;Confirm Password&lt;/label&gt;
    &lt;input formControlName="confirmPassword" [formGroup]="password" type="password" class="form-control" id="confirmPassword" name="confirmPassword" #confirmPassword="ngModel"&gt;
    &lt;div class="alert alert-danger" *ngIf="password.controls.confirmPassword.errors?.MatchPassword &amp;&amp; (confirmPassword.touched || confirmPassword.dirty)"&gt;Password not match&lt;/div&gt;
  &lt;/div&gt;
  &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p>I tought that <code>#confirmPassword="ngModel"</code> will solve this, on the <code>confirmPassword input</code>, but that's what causing the error.</p>
  
  <p>What am I doing wrong here?</p>