title: Angular CLI compile error; Expected 1 arguments, but got 0
body: <p>This is my first angular project, and I was trucking right along, using the built in server, and occasionally doing a build to push to a server - now I'm trying a --prod build ...and Im getting compile errors.</p>
  
  <p>Thu a buch of reading I've managed to solve most of them and I understand the AOT needs, however this one error has me baffled</p>
  
  <p>I use this code repeatedly thru the app to start my forms, </p>
  
  <pre><code>&lt;form novalidate="novalidate"
      autocomplete="off"
      [formGroup]="form"
      (submit)="form.valid &amp;&amp; submitForm()" &gt;
  </code></pre>
  
  <p>but on a few of these templates I am getting </p>
  
  <pre><code>x.component.html(6,3): : Expected 1 arguments, but got 0.
  </code></pre>
  
  <p>where line 6 is: (submit)="form.valid &amp;&amp; submitForm()" ></p>
  
  <p>======== 
      NOTE: I have reduced the code to a bare bones</p>
  
  <pre><code>and included it here, so you see EXACTLY what is there...
  
  no extrapolating or generalizing.
  
  Builds fine in dev mode
  </code></pre>
  
  <h1>    cli v(1.6.0)</h1>
  
  <p>I still get the same error - user-form.component.html(6,4): Expected 1 arguments, but got 0.</p>
  
  <p>So I thought I'd give the full component and template.</p>
  
  <p><strong>component.ts</strong></p>
  
  <pre><code>import { Component, OnInit, EventEmitter, Output } from '@angular/core';
  import { FormBuilder, FormGroup, FormControl, NgForm, NgControl, Validators } from '@angular/forms';
  import { AbstractControl } from '@angular/forms/src/model';
  import { ValidationErrors } from '@angular/forms/src/directives/validators';
  
  import { get } from 'lodash';
  
  @Component({
      selector: 'user-form',
      templateUrl: './user-form.component.html',
  })
  
  export class UserFormComponent implements OnInit {
  
      form: FormGroup;
      loading = false;
      submitAttempted = false;
  
      constructor(
      ) { }
  
      get formDisabled () {
          return this.loading === true;
      }
  
      get xStatus () {
          const field = this.form.get('x');
          if (!field.touched) {
              return '';
          }
          if (field.errors &amp;&amp; field.errors.required) {
              return 'This field is required';
          }
      }
  
  
      get formModel () {
          return {
              x: this.form.get('x').value
          }
      }
  
      ngOnInit() {
          this.form = new FormGroup({
              x: new FormControl(
                  {
                      value: 'x',
                      disabled: this.formDisabled,
                  },
                  [
                      Validators.required
                  ]
              )
          })
      }
  
      resetForm () {
          this.form.get('x').markAsUntouched();
          this.submitAttempted = false;
      }
  
      submitForm(form: NgForm) {
          console.log( this.form );
      }
  
      showError (fieldName: string) {
          const field = this.form.get(fieldName);
          return field.invalid &amp;&amp; (field.touched || this.submitAttempted);
      }
  
  }
  </code></pre>
  
  <p><strong>template.ts</strong> (user-form.component.html)</p>
  
  <pre><code>&lt;form 
      novalidate="novalidate"
      autocomplete="off"
      [formGroup]="form"
      (ngSubmit)="submitForm()" &gt;
  
      &lt;label class="input" [class.state-error]="showError('x')"&gt;
          &lt;input type="text" name="x" placeholder="x" formControlName="x" /&gt;
          &lt;div *ngIf="xStatus" [innerHTML]="xStatus | safeHtml"&gt;&lt;/div&gt;
      &lt;/label&gt;
  
  
      &lt;button type="submit" class="btn btn-primary" (click)="submitAttempted = true"&gt;
          &lt;i *ngIf="loading" class='fa fa-spinner fa-spin '&gt;&lt;/i&gt;
          {{ loading ? 'Saving' : 'Add x' }}
      &lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>