title: do not use CanDeactivate guard when using submit button
body: <p>Here is my canDeactivate guard and it works.  But I dont want to call the guard when I use the submit button.  Only when I navigate by any other means.  How?</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Router, CanDeactivate } from '@angular/router';
  import { FormGroup } from '@angular/forms';
  
  export interface FormComponent {
      myForm: FormGroup;
  }
  
  @Injectable()
  export class DirtyGuard implements CanDeactivate&lt;FormComponent&gt;  {
    constructor(private router: Router) {}
  
    canDeactivate(component: FormComponent) {
        console.log(component.myForm)
          if (component.myForm.dirty ){
              return confirm('You have unsaved changes. Are you sure you want to navigate away?');
          }
          return true;
    }
  }
  
   &lt;button md-raised-button [disabled]="!myForm.valid" type="submit" color="primary"&gt;
                              &lt;i class="material-icons"&gt;arrow_forward&lt;/i&gt;
                              Exposures: Currencies
                          &lt;/button&gt;
  </code></pre>