title: Cannot find name 'Ngform'
body: <p>I am new to angular and I am working with template driven form.When I am using NgForm Its throwing error : </p>
  
  <p>src/app/pages/add-booking/servicing/servicing.component.ts(40,17): error TS2304: Cannot find name 'Ngform'.</p>
  
  <p>Below is my is code : servicing.component.html</p>
  
  <pre><code>&lt;form novalidate #a="ngForm" (ngSubmit)="onSubmit(a)"  &gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-6 col-sm-6 col-lg-6"&gt;
              &lt;div class="form-group"&gt;
                &lt;input type="text" id="num" name="num" class="form-control" required [(ngModel)]="registrationNumber" #num="ngModel"&gt;
                &lt;label class="form-control-placeholder" for="num"&gt;Registration Number&lt;/label&gt;
              &lt;/div&gt;
              &lt;div class="form-control-feedback"*ngIf="num.errors &amp;&amp; (num.dirty || num.touched)"&gt;
                  &lt;p *ngIf="num.errors.required"&gt;Registration Number is required&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6 col-sm-6 col-lg-6"&gt;
            &lt;button type="button"(click)='someFunction()'&gt;click&lt;/button&gt;
          &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="line"&gt;
    &lt;h4&gt;&lt;span&gt;Vehicle Details&lt;/span&gt;&lt;/h4&gt;
  &lt;/div&gt;
  
  &lt;div class="row"&gt;
    &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
      &lt;div class="form-group"&gt;
        &lt;select name="brand" id="brand" class="form-control"  [(ngModel)]="data.vehicleBrand" #brand="ngModel" required&gt;
            &lt;option *ngFor = "let sa of vehicleBrand" [value] = "sa"&gt; {{sa}}&lt;/option&gt;
        &lt;/select&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
      &lt;div class="form-control-feedback"*ngIf="brand.errors &amp;&amp; (brand.dirty || brand.touched)" style="display:inline-block"&gt;
          &lt;p *ngIf="brand.errors.required"&gt;Brand is required&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="row"&gt;
    &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
      &lt;div class="form-group"&gt;
        &lt;select name="model" id="model" class="form-control"  [(ngModel)]="data.VehicleModel" #model="ngModel" required&gt;
            &lt;option *ngFor = "let sa of vehicleModel" [value] = "sa"&gt; {{sa}}&lt;/option&gt;
        &lt;/select&gt;
        &lt;label class="form-control-placeholder" for="ServiceAdvisor"&gt;Vehicle Model&lt;/label&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
      &lt;div class="form-control-feedback"*ngIf="model.errors &amp;&amp; (model.dirty || model.touched)"&gt;
          &lt;p *ngIf="model.errors.required"&gt;Model is required&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="row"&gt;
    &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
      &lt;div class="form-group"&gt;
        &lt;select name="variant" id="variant" class="form-control"  [(ngModel)]="data.Vehiclevariant" #variant="ngModel" required&gt;
            &lt;option *ngFor = "let sa of vehicleVariant" [value] = "sa"&gt; {{sa}}&lt;/option&gt;
        &lt;/select&gt;
        &lt;label class="form-control-placeholder" for="ServiceAdvisor"&gt;Vehicle Variant&lt;/label&gt;
      &lt;/div&gt;
     &lt;/div&gt;
      &lt;div class="col-md-6 col-lg-6 col-sm-6"&gt;
        &lt;div class="form-control-feedback"*ngIf="variant.errors &amp;&amp; (variant.dirty || variant.touched)"&gt;
            &lt;p *ngIf="variant.errors.required"&gt;Variant is required&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
    &lt;button type="submit" [disabled]="a.invalid"&gt;S&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And servicing.component.ts ::</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import {FormsModule} from '@angular/forms';
  import {Servicing} from '../../model/AddServicing';
  import {NgForm} from '@angular/forms';
  import {ViewChild } from '@angular/core';
  import {ServicingService } from '../../services/addServicing.service';
  
  
  @Component({
    selector: 'app-servicing',
    templateUrl: './servicing.component.html',
    styleUrls: ['./servicing.component.scss']
  })
  export class ServicingComponent implements OnInit {
  
    @ViewChild('f') form: any;
    registrationNumber:string;
    private ServicingType: string[];
    private Complaints: string[];
    private service_advisor: string[];
    private creName: string[];
  
    public vehicle = [];
  
    constructor(private _data:ServicingService) { }
  
  
    ngOnInit() {
      this.ServicingType =  ['Body Repair', 'Servicing', 'Both'];
      this.Complaints =  ['First', 'Second', 'Third'];
      this.service_advisor = ['Anurag','Rohit','Rahul','Add Service Advisor'];
      this.creName = ['Rohnit','Mohit','Nitin','Add CRE'];
      this._data.getUser().subscribe(data =&gt; this.vehicle = data);
    }
  
    someFunction(){
      console.log(this.registrationNumber);
    }
  
    onSubmit(form:Ngform) {
       if (this.form.valid) {
           console.log("Form Submitted!");
           console.log(this.form.value.num);
           this.form.reset();
           }
         }
  
    }
  </code></pre>
  
  <p>Please Help me..I do not know from where is error is coming</p>