2017-05-29 3 views
0

ist Ich versuche the example project of ag-grid aber erhalte die folgende Ausnahme auszuführen:Kann nicht binden ‚gridOptions‘, da es nicht eine bekannte Eigenschaft von ‚ag-Gitter-Winkel‘

Kann nicht binden " gridOptions ag-Gitter-Winkel, da es nicht eine bekannte Eigenschaft von ist ''

Code:

<div style="width: 200px;"> 
    <ag-grid-angular #agGrid style="width: 100%; height: 200px;" class="ag-fresh" 
        [gridOptions]="gridOptions"> 
    </ag-grid-angular> 
</div> 

es sagt, dass es nicht so eine Stütze wie ‚gridOp auf ag-grid-angular. Es ist seltsam, da es von der offiziellen Website von Ag-Grid kommt.

Jede Hilfe wird zutiefst geschätzt!

Antwort

2

Es scheint, dass Sie nicht AgGridModule mit @NgModule({})

Bitte versuchen Sie es unter Code registriert haben, wenn verpasst:

import {NgModule} from "@angular/core"; 
import {AgGridModule} from "ag-grid-angular/main"; 
import {AppComponent} from "./app.component"; 
import {MyGridApplicationComponent} from "./my-grid-application/my-grid-application.component"; 
import {RedComponentComponent} from "./red-component/red-component.component"; 

@NgModule({ 
    declarations: [ 
     AppComponent, 
     MyGridApplicationComponent, 
     RedComponentComponent 
    ], 
    imports: [ 
     BrowserModule, 
     AgGridModule.withComponents(
      [RedComponentComponent] 
     ) 
    ], 
    providers: [], 
    bootstrap: [AppComponent] 
}) 
export class AppModule { 
} 
+0

Knall auf !!!!!!!! – ritesh

Verwandte Themen