I'm trying to run the example project of ag-grid but getting the following exception:
Can't bind to 'gridOptions' since it isn't a known property of 'ag-grid-angular'
Code:
<div style="width: 200px;">
<ag-grid-angular #agGrid style="width: 100%; height: 200px;"
[gridOptions]="gridOptions" class="ag-fresh">
</ag-grid-angular>
</div>
It says that there isn't such a prop as 'gridOptions' on ag-grid-angular. It's weird since it comes from the official website of ag-grid.
Any help will be profoundly appreciated!
It seems you have not registered AgGridModule with @NgModule({})
Please try below code if missed:
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 {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With