title: Angular 6 build error Expected 0 arguments, but got 1 in form
body: <p>I am getting this error: Expected 0 arguments, but got 1, when I build my project, but on <code>ng-serve</code> the project is fine? Any idea's what this could be? the error points towards: <code>(ngSubmit)="onSubmit(serviceForm.value)"</code></p>
  
  <p><strong>my html is:</strong> </p>
  
  <pre><code>&lt;form class="form-horizontal" [formGroup]="serviceForm" (ngSubmit)="onSubmit(serviceForm.value)"&gt;
        &lt;div class="form-group mb-8"&gt;
          &lt;div class="col-3 col-sm-12"&gt;
            &lt;label class="form-label" for="u_message_description"&gt;Please describe your issue:&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="col-4 col-sm-12"&gt;
            &lt;textarea class="form-input" id="u_message_description" placeholder="Describe your issue" rows="3"
              formControlName="u_message_description"&gt;&lt;/textarea&gt;
            &lt;h6 class="text-gray mt-2"&gt;The more information you can provide here, the easier time the organization will
              have in diagnosing and resolving your issue.&lt;/h6&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="columns col-12 col-sm-12"&gt;
          &lt;div class="column col-10 col-sm-6 text-right"&gt;
            &lt;button class="btn btn-link"&gt;Cancel&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="column col-2 col-sm-6"&gt;
            &lt;button class="btn btn-primary" [ngClass]="{'loading': uploading}" [disabled]="!serviceForm.valid" type="submit"&gt;Submit&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p><strong>Component.ts</strong></p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ReactiveFormsModule } from '@angular/forms';
  import { FormGroup, FormControl } from '@angular/forms';
  import { Validators } from '@angular/forms';
  import { FormBuilder } from '@angular/forms';
  import { Request } from '../../models/request.model'
  import { Router } from '@angular/router';
  import { Observable } from 'rxjs';
  import { AppComponent } from '../../../app.component';
  import { nowService } from '../../services/servicenow.service';
  import { HttpClient, HttpEventType, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';
  
  
  @Component({
    selector: 'app-service-request',
    templateUrl: './service-request.component.html',
    styleUrls: ['./service-request.component.scss']
  })
  export class ServiceRequestComponent implements OnInit {
  
  
    public loading = false;
  
    public uploading: boolean;
  
    private customer_id = 7; /// this.appComponent.customer_id;
  
    serviceForm;
  
    constructor(private service: nowService,
      private appComponent: AppComponent,
      private router: Router,
      private http: HttpClient,
    ) {
    }
  
    ngOnInit() {
      this.serviceForm = new FormGroup({
        u_short_description: new FormControl('', Validators.compose([
          Validators.required,
          Validators.minLength(0),
          Validators.maxLength(80)
        ])),
        u_message_description: new FormControl(''),
      });
    }
  
     onSubmit() {
      if(this.serviceForm.invalid) {
         this.serviceForm.setErrors({ ...this.serviceForm.errors, 'required': true });
         return;
      }
      //this.loading = true;
      this.uploading = true;
      this.service.postFormData(this.serviceForm.value).subscribe((response: any) =&gt; {
        console.log(response);//On success response
        this.router.navigate(['/inc/confirmation'],{queryParams: {value: response.result[0].display_value}});
      }, (errorResponse: any) =&gt; {
        console.log(errorResponse); //On unsuccessful response
      });
      }
    }
  </code></pre>
  
  <p><strong>service.ts</strong></p>
  
  <pre><code>postFormData(payload) {
      return this.http.post(this.incidentApiUrl, payload, { headers: new HttpHeaders().set("Content-Type", "application/json") });
    }
  </code></pre>