我正在使用p-checkBox pf prime ng 4.1 rc2版本
我收到以下错误
Can't bind to 'ngModel' since it isn't a known property of 'p-checkBox'.
我在app.module.ts中添加了通用模块,表单模块,但它仍然无法正常工作
解决方法
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,...