Skip to main content
cngx-src documentation

CngxCellTpl

Directivev0.1.0

projects/data-display/treetable/column-template.directive.ts

Import#

import { CngxCellTpl } from '@cngx/data-display/treetable'

Description#

Marks an <ng-template> as a custom cell template for a named column. The template context is typed as CngxCellTplContext.

Apply to an <ng-template> inside <cngx-treetable>:

<cngx-treetable [tree]="tree">
  <ng-template [cngxCell]="'name'" let-node let-value="value">
    <strong>{{ value }}</strong> - depth {{ node.depth }}
  </ng-template>
</cngx-treetable>

Metadata#

Index#

Inputs

Inputs#

column#string
input()Required

The column key this template replaces. Bound via the cngxCell attribute.

default { alias: 'cngxCell' }