contextMenu 和 CRUD table ngPrime angular2 问题
issue with contextMenu and CRUD table ngPrime angular2
我在 angular2
应用程序中使用 ngprime
。我正在为我的 table 视图使用 DataTable
并能够排序、过滤,但是当我尝试使用 Crud
功能或 ContextMenu
我收到错误...
我的AppModule
import {SplitButtonModule} from "primeng/components/splitbutton/splitbutton";
@NgModule({
declarations: [
AppComponent,
CarsComponent,
ModsComponent
],
imports: [
BrowserModule, FormsModule,
HttpModule, routing,
DataTableModule, SharedModule,
ButtonModule, DropdownModule,
TieredMenuModule, SplitButtonModule
],
providers: [
AppConfig, CarsService,
{ provide: APP_INITIALIZER, useFactory: (config: AppConfig) => () => config.load(), deps: [AppConfig], multi: true }
],
bootstrap: [AppComponent]
})
export class AppModule { }
从 ngPrime docs
找到的示例代码 Here
错误...
Unhandled Promise rejection: Template parse errors: Can't bind to 'model' since it isn't a known property of 'p-contextMenu'.
1. If 'p-contextMenu' is an Angular component and it has 'model' input, then verify that it is part of this module.
2. If 'p-contextMenu' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
Unhandled Promise rejection: Template parse errors: Can't bind to 'visible' since it isn't a known property of 'p-dialog'.
1. If 'p-dialog' is an Angular component and it has 'visible' input, then verify that it is part of this module.
2. If 'p-dialog' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
我是否遗漏了任何进口商品?
您必须在模块导入中从 primeng/primeng
导入 ContextMenuModule
和 DialogModule
。
我在 angular2
应用程序中使用 ngprime
。我正在为我的 table 视图使用 DataTable
并能够排序、过滤,但是当我尝试使用 Crud
功能或 ContextMenu
我收到错误...
我的AppModule
import {SplitButtonModule} from "primeng/components/splitbutton/splitbutton";
@NgModule({
declarations: [
AppComponent,
CarsComponent,
ModsComponent
],
imports: [
BrowserModule, FormsModule,
HttpModule, routing,
DataTableModule, SharedModule,
ButtonModule, DropdownModule,
TieredMenuModule, SplitButtonModule
],
providers: [
AppConfig, CarsService,
{ provide: APP_INITIALIZER, useFactory: (config: AppConfig) => () => config.load(), deps: [AppConfig], multi: true }
],
bootstrap: [AppComponent]
})
export class AppModule { }
从 ngPrime docs
找到的示例代码 Here
错误...
Unhandled Promise rejection: Template parse errors: Can't bind to 'model' since it isn't a known property of 'p-contextMenu'.
1. If 'p-contextMenu' is an Angular component and it has 'model' input, then verify that it is part of this module.
2. If 'p-contextMenu' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
Unhandled Promise rejection: Template parse errors: Can't bind to 'visible' since it isn't a known property of 'p-dialog'.
1. If 'p-dialog' is an Angular component and it has 'visible' input, then verify that it is part of this module.
2. If 'p-dialog' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
我是否遗漏了任何进口商品?
您必须在模块导入中从 primeng/primeng
导入 ContextMenuModule
和 DialogModule
。