Angular ui grid 什么是colContainer属性,在哪里可以找到它的文档

Angular ui grid 什么是colContainer属性,在哪里可以找到它的文档,angular-ui-grid,Angular Ui Grid,我刚刚开始发现过去的几天。 的文档显示了如何使用rowTemplate属性的示例: 行模板 默认情况下为“ui网格/ui网格行”。如果提供,此设置将使用自定义行模板。可以设置为模板文件的名称: $scope.gridOptions.rowTemplate = 'row_template.html'; 内联html $scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="gr

我刚刚开始发现过去的几天。 的文档显示了如何使用
rowTemplate
属性的示例:

行模板

默认情况下为“ui网格/ui网格行”。如果提供,此设置将使用自定义行模板。可以设置为模板文件的名称:

$scope.gridOptions.rowTemplate = 'row_template.html';
内联html

$scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ui-grid-cell></div>';
$scope.gridOptions.rowTemplate='';
正如您在
rowTemplate
html代码中所看到的,有一个
ng repeat
迭代
colContainer.renderedColumns
col
项,还有一个
track by
选项,它使用
col.colDef.name

同样的模板也被用在了测试中

我在文档中查找
colContainer
属性的来源,我在下面只找到了一个同名的属性,没有任何详细信息(我已经不知道它是否与上面和中的
rowTemplate
示例中使用的
colContainer
属性完全相同,因为在
>若要启用,您必须包括“ui.grid.cellNav”模块
,并且在中没有此模块的注入) 在下还有一个属性
sourceColContainer
,但它不是同一个poperty名称,但可能是它的来源

我想找到
colContainer
属性的文档,更好地理解它,并知道它自己的子属性(除了
colDef.name
)或者至少我想知道它的起源,如果没有文档,我想查看它的代码源,也许这也会有用

致意。

我找到了这个/src/js/core/directives/ui网格渲染容器。js:47:

所以colContainer实际上是一个渲染容器,您可以通过执行
$scope.gridApi.grid.renderContainers[“nameOfColContainer”]

要知道集装箱的
名称
,您必须在此处检查模板


(/src/templates/ui-grid/ui-grid.html:33):


在renderContainer中,您将有一个名为renderedColumns的对象,其中包含要渲染的列。 您还可以访问除“body”之外的其他容器:左侧和右侧。
这是如果您使用pintedleft和/或right,body是中心容器。

我发现col来自类
 var colContainer = $scope.colContainer = grid.renderContainers[$scope.colContainerName];
 <div ui-grid-render-container
      container-id="'body'"
      col-container-name="'body'"
      row-container-name="'body'"
      bind-scroll-horizontal="true"
      bind-scroll-vertical="true"
      enable-horizontal-scrollbar="grid.options.enableHorizontalScrollbar"
      enable-vertical-scrollbar="grid.options.enableVerticalScrollbar">
    </div>