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 valuerow: The full row data objectcolumn: The column configuration
Import the directive in your component:
import { GridColumnView } from '@toolbox-web/grid-angular';
@Component({ imports: [GridColumnView], // ...})Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
template | Signal<TemplateRef<any> | undefined> | Query for the ng-template content child. |
Methods
Section titled “Methods”ngTemplateContextGuard()
Section titled “ngTemplateContextGuard()”Static type guard for template context. Enables type inference in templates.
ngTemplateContextGuard(dir: GridColumnView, ctx: unknown): ctxParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
dir | GridColumnView | |
ctx | unknown |
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