TbwRenderer
Structural directive for cell view rendering.
This provides a cleaner syntax for defining custom cell renderers without
the nested <tbw-grid-column-view> and <ng-template> boilerplate.
<!-- Instead of this verbose syntax: --><tbw-grid-column field="status"> <tbw-grid-column-view> <ng-template let-value let-row="row"> <app-status-badge [value]="value" /> </ng-template> </tbw-grid-column-view></tbw-grid-column>
<!-- Use this cleaner syntax: --><tbw-grid-column field="status"> <app-status-badge *tbwRenderer="let value; row as row" [value]="value" /></tbw-grid-column>Template Context
Section titled “Template Context”The structural directive provides the same context as GridColumnView:
$implicit/value: The cell value (uselet valueorlet-value)row: The full row data object (userow as roworlet-row="row")column: The column configuration
Import
Section titled “Import”import { TbwRenderer } from '@toolbox-web/grid-angular';
@Component({ imports: [TbwRenderer], // ...})Methods
Section titled “Methods”ngOnDestroy()
Section titled “ngOnDestroy()”A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
ngOnDestroy(): voidngTemplateContextGuard()
Section titled “ngTemplateContextGuard()”Static type guard for template context.
Uses any defaults for ergonomic template usage.
ngTemplateContextGuard(dir: TbwRenderer, ctx: unknown): ctxParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
dir | TbwRenderer | |
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