Skip to content

GridColumnView

Directive that captures an <ng-template> for use as a cell renderer.

This enables declarative Angular component usage with proper input bindings that satisfy Angular’s AOT compiler.

<tbw-grid-column field="status">
<tbw-grid-column-view>
<ng-template let-value let-row="row">
<app-status-badge [value]="value" [row]="row" />
</ng-template>
</tbw-grid-column-view>
</tbw-grid-column>

The template context provides:

  • $implicit / value: The cell value
  • row: The full row data object
  • column: The column configuration

Import the directive in your component:

import { GridColumnView } from '@toolbox-web/grid-angular';
@Component({
imports: [GridColumnView],
// ...
})
PropertyTypeDescription
templateSignal<TemplateRef<any> | undefined>Query for the ng-template content child.

Static type guard for template context. Enables type inference in templates.

ngTemplateContextGuard(dir: GridColumnView, ctx: unknown): ctx
NameTypeDescription
dirGridColumnView
ctxunknown

AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt