Typescript GridOptions接口ag网格

Typescript GridOptions接口ag网格,typescript,ag-grid,Typescript,Ag Grid,在ag Grid上,关于这个GridOptions接口有很多提到 所有人都声称 this options are available through the GridOptions interface 例如,我通过以下方式在不“使用”此gridOptions的情况下访问columnDefs属性: .html 然而,我不知道如何在不调用gridOptions的情况下集成某些功能,就像api提供的那样 我怎样才能提到/接触到这个gridOptions?要在HTML中提到gridOptions,请输

在ag Grid上,关于这个GridOptions接口有很多提到

所有人都声称

this options are available through the GridOptions interface
例如,我通过以下方式在不“使用”此gridOptions的情况下访问columnDefs属性:

.html 然而,我不知道如何在不调用gridOptions的情况下集成某些功能,就像api提供的那样


我怎样才能提到/接触到这个gridOptions?

要在HTML中提到gridOptions,请输入以下代码

 [gridOptions]="gridOptions"
在你的组件中

public gridOptions: GridOptions;
关于恩戈尼特

this.gridOptions.columnDefs=this.columnDefs;

然后您可以在代码中的任何位置访问此gridoptions。

这实际上不起作用,在onInit期间,gridoptions仍然不存在。事实上,即使在ongrid准备好了。。。这让我担心
public gridOptions: GridOptions;
this.gridOptions.columnDefs=this.columnDefs;