14

I am using p-checkbox pf prime ng 4.1 rc2 version

I am getting the below error

Can't bind to 'ngModel' since it isn't a known property of 'p-checkbox'.

i have added the common module,form module in app.module.ts but still it is not working

1 Answers1

25

ngModel is part of FormsModule, that is why you will need to import FormsModule from @angular/forms and add it inside imports metadata option of NgModule. After doing this, you should be able to use ngModel directive in the templates that belong to the module where FormsModule was imported.

mymodule.module.ts

import { CommonModule } from '@angular/common';
import { FormsModule }    from '@angular/forms';

@NgModule({
    imports: [CommonModule, FormsModule,...
victooor
  • 330
  • 3
  • 7