“Can't bind to 'ngModel' since it isn't a known property of 'p-calendar'” error message trying to use PrimeNG component, why?

后端 未结 2 1533
失恋的感觉
失恋的感觉 2021-02-20 12:44

I am very new in Angular 2\\4 and I am trying to follow this quick video tutorial to add PrimeNG components to my Angular project:

http

2条回答
  •  一生所求
    2021-02-20 13:29

    Add FormsModule in your AppModule:

    // ...
    import { FormsModule } from '@angular/forms';
    // ...
    
    @NgModule({
      // ...
      imports: [
        BrowserModule,
        FormsModule,
        CalendarModule
      ],
      // ...
    })
    export class AppModule { }
    

提交回复
热议问题