2017-02-17 7 views
1

私はangular2アプリケーションでngprimeを使用しています。私はエラーを取得していますCrud機能やContextMenuを使用しようとすると、私は...見つけngPrime docsから使用contextMenuとCRUDテーブルの問題ngPrime angular2

マイ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 { } 

サンプルコードを私のテーブルビューのためDataTableを使用して並べ替えることができ、フィルタが、い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. 

ここに輸入品がありませんか?

答えて

2

モジュールのインポートでContextMenuModuleDialogModuleprimeng/primengからインポートする必要があります。

+0

ありがとう、それは働いた。 – user1653027

+0

とにかく、コンテキストメニューとselectionModeオプションを変更することができます。[hasPermission]の[ ] = "'admin'" selectionMode = "multiple"、その他のものはシングルですか? – user1653027