here is the error: Can't bind to 'ngModel' since it isn't a known pro" /> here is the error: Can't bind to 'ngModel' since it isn't a known pro" /> here is the error: Can't bind to 'ngModel' since it isn't a known pro"/>

Can't bind to 'ngModel' although importing { FormsModule } from '@angular/forms'

84 views Asked by At

here is the component.html <input [(ngModel)]="email" (keyup.enter)="onKeyUp()"> here is the error: Can't bind to 'ngModel' since it isn't a known property of 'input'.

here is my app.module where is imported and added FormsModule

import { FormsModule } from '@angular/forms';
import { NgModule } from '@angular/core';

import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { CoursesServices } from './courses.services';
import { CustomerComponent } from './customer/customer.component';

@NgModule({
  declarations: [
    AppComponent,
    CustomerComponent
  ],
  imports: [
    BrowserModule,
    FormsModule
  ],
  providers: [CoursesServices],
  bootstrap: [AppComponent]
})
export class AppModule { }
0

There are 0 answers