title: Angular Validation Error as 'ngClass' since it isn't a known property of 'div'. (
body: <p>Here i wrote a small Validation Property for EName Validation when i try 2 Load Html page i'm getting Error as 'ngClass' since it isn't a known property of 'div'. (</p>
  
  <p><strong>Component.ts</strong></p>
  
  <pre><code>import { Component, OnInit } from "@angular/core"
  import { Employee } from "../../../templates/employee/employee"
  import { Validators, FormGroup, FormBuilder } from "@angular/forms"
  @Component({
      selector: "customer-ui",
      templateUrl: "../../../templates/customer/customer.html"
  })
  export class JamComponent implements OnInit {
      EmpleoyeeForm: FormGroup;
      public constructor(private fb: FormBuilder) {}
      ngOnInit(): void {
          this.EmpleoyeeForm = this.fb.group({
              EmpName: ['', [Validators.required]]
  
          })
      }
  </code></pre>
  
  <p><strong>Htmlcode</strong></p>
  
  <pre><code>&lt;form class="form-horizontal" novalidate [formGroup]="EmpleoyeeForm"&gt;
  
      &lt;fieldset&gt;
          &lt;div class="form-group" [ngClass]="{'has-error': (EmpleoyeeForm.get('EmpName').touched ||
                                                    EmpleoyeeForm.get('EmpName').dirty) &amp;&amp;
                                                      !EmpleoyeeForm.get('EmpName').valid }"&gt;
  
              &lt;label for="name"&gt;Name&lt;/label&gt;
              &lt;input type="text" class="form-control" formControlName="EmpName" [(ngModel)]="EmpName" /&gt;
  
          &lt;/div&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>