title: Angular ....error TS2554: Expected 1 arguments, but got 0
body: <p>Error: src/app/form-page/form-page.component.html:1:29 - error TS2554: Expected 1 arguments, but got 0.</p>
  <p>&lt;mat-form-field (ngSubmit)=&quot;onSubmit()&quot;  class=&quot;form-register&quot;&gt;
  ~~~~~~~~</p>
  <pre><code>    src/app/form-page/form-page.component.ts:8:16
  </code></pre>
  <p>templateUrl: './form-page.component.html',
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Error occurs in the template of component FormPageComponent.</p>
  <p>this is my html code</p>
  <pre><code>```
         &lt;mat-form-field (ngSubmit)=&quot;onSubmit()&quot;  class=&quot;form-register&quot;&gt;
          &lt;p&gt;
            &lt;mat-form-field appearance=&quot;outline&quot;&gt;
            &lt;mat-label&gt;First Name&lt;/mat-label&gt;
            &lt;input  matInput
              type=&quot;text&quot; 
              placeholder=&quot;First Name&quot;
              ngModel
              required&gt;
          &lt;/mat-form-field&gt;
       &lt;/p&gt;
       &lt;p&gt;
         &lt;mat-form-field appearance=&quot;outline&quot;&gt;
         &lt;mat-label&gt;Last Name&lt;/mat-label&gt;
         &lt;input matInput 
           placeholder=&quot;Last Name&quot;
           ngModel
           required&gt;
         &lt;/mat-form-field&gt;
     &lt;/p&gt;
      &lt;p&gt;
        &lt;mat-form-field appearance=&quot;outline&quot;&gt;
        &lt;mat-label&gt;Age&lt;/mat-label&gt;
        &lt;input matInput 
           placeholder=&quot;Age&quot;
           ngModel
           required&gt;
       &lt;/mat-form-field&gt;
     &lt;/p&gt;
     &lt;p&gt;
        &lt;mat-form-field appearance=&quot;outline&quot;&gt;
        &lt;mat-label&gt;Gender&lt;/mat-label&gt;
        &lt;mat-select ngModel required&gt;
            &lt;mat-option&gt;Male&lt;/mat-option&gt;
            &lt;mat-option&gt;Female&lt;/mat-option&gt;
            &lt;mat-option&gt;Transgender&lt;/mat-option&gt;
            &lt;mat-option&gt;Prefer Not To Say&lt;/mat-option&gt;
        &lt;/mat-select&gt;
        &lt;/mat-form-field&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;mat-form-field appearance=&quot;outline&quot;&gt;
        &lt;mat-label&gt;Mobile Number&lt;/mat-label&gt;
        &lt;input matInput 
           placeholder=&quot;Mobile Number&quot;
           ngModel
           required&gt;
      &lt;/mat-form-field&gt;
     &lt;/p&gt;
  
           &lt;button mat-button (click)=&quot;creationDone()&quot;&gt; Submit&lt;/button&gt;
  
     &lt;/mat-form-field&gt;
  </code></pre>
  <p>this is my ts code</p>
  <pre><code>     import { Component, OnInit, ViewChild,Inject } from '@angular/core';
       import { FormControl, FormGroup, NgForm, NgModel } from '@angular/forms';
       import {MatDialog, MatDialogRef,MAT_DIALOG_DATA} from '@angular/material/dialog';
  
  
        @Component({
         selector: 'app-form-page',
         templateUrl: './form-page.component.html',
         styleUrls: ['./form-page.component.scss']
         })
        export class FormPageComponent {
           @ViewChild('f') userform:NgForm;
            onSubmit(form){
                 console.log(form.value);
             }
          constructor(public dialog: MatDialog) {}
            creationDone() {
              this.dialog.open(SubmitDialog);
                 }
  </code></pre>
  <p>}</p>