title: Angular reactive form submit programmatically without button
body: <p>I would like to submit a form automatically when all the fields in the form are valid,.</p>
  <p>How can I trigger a form submission with codes but no buttons?</p>
  <p>Here is an example form:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form [formGroup]=&quot;dummyForm&quot;&gt;
    &lt;label&gt;
      &lt;input type=&quot;text&quot; formControlName=&quot;dummyText&quot; ng-change=&quot;autoSubmit()&quot;/&gt;
    &lt;/label&gt;
  &lt;/form&gt;
  </code></pre>
  <p>component.ts:</p>
  <pre class="lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { FormGroup } from '@angular/forms';
  import { RxFormBuilder, RxwebValidators } from '@rxweb/reactive-form-validators';
  
  @Component({
    selector: 'dummy-page',
    templateUrl: './dummy.component.html',
    styleUrls: ['./dummy.component.sass']
  })
  export class DummyComponent {
    dummyForm: FormGroup;
  
    constructor(
      private readonly _formBuilder: RxFormBuilder
    ) {
      // Do something here
    }
    ngOnInit(): void {
      this.dummyForm = this._formBuilder.group({
        dummyText: ['', [
           RxwebValidators.pattern({
             pattern: {
               validPattern: /^1234$/
             }
           })
        ]]
      });
    }
    autoSubmit(): void {
      if (!this.dummyForm.valid) {
        return;
      } else {
        // Trigger form submission here, how?
      }
    }
  }
  </code></pre>