Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

primeng checkbox ngmodel is not known property

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

like image 895
Pradeep Prabhu B R Avatar asked Jul 01 '17 12:07

Pradeep Prabhu B R


1 Answers

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,...
like image 200
victooor Avatar answered Oct 03 '22 21:10

victooor