title: Submit in custom Angular button component does not submit form
body: <p>I have extracted the submit button into a seperate component. Now, the form is not submitted/the submit function is not called anymore as ngSubmit is not triggered.</p>
  
  <pre><code>&lt;form [formGroup]='form' (ngSubmit)='submit(form.value)'&gt;
     ...
     &lt;app-submit-button&gt;&lt;/app-submit-button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The problem is that the button in my custom component app-submit-button triggers a function call on click. The submit event is not further propagated to the parent component and thus its submit function is not executed. However, when I remove (click)='submit()' from the child component, form submit works.</p>
  
  <pre><code>&lt;ng-container [ngSwitch]='state'&gt;
    &lt;button *ngSwitchCase='buttonState.Idle' (click)='submit()'
      type='submit'&gt;{{idleText}}&lt;/button&gt;
    ...
  &lt;/ng-container&gt;
  </code></pre>
  
  <p>I tried it with and without type='submit' on app-submit-button and on the button itself.</p>
  
  <p>I got it working with</p>
  
  <pre><code>&lt;app-submit-button (click)='submit(form.value)'&gt;&lt;/app-submit-button&gt;
  </code></pre>
  
  <p>and removing ngSubmit. I would like to know if it is the proper way or if this behaves differently then using ngSubmit.</p>