Skip to content

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>

The structural directive provides the same context as GridColumnView:

  • $implicit / value: The cell value (use let value or let-value)
  • row: The full row data object (use row as row or let-row="row")
  • column: The column configuration
import { TbwRenderer } from '@toolbox-web/grid-angular';
@Component({
imports: [TbwRenderer],
// ...
})

A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

ngOnDestroy(): void

Static type guard for template context. Uses any defaults for ergonomic template usage.

ngTemplateContextGuard(dir: TbwRenderer, ctx: unknown): ctx
NameTypeDescription
dirTbwRenderer
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